From nobody Thu Oct 9 13:50:22 2025 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (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 EEF172E3AE3; Tue, 17 Jun 2025 13:45:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750167910; cv=none; b=eghzDLUv6H8RfC0bDFChgBsHdJLNDd4eZj/Gi7OlQ7Xxv/ygVYgUTVYHSsO54OWnwz52lO4ZkvHoj8Da2ThamQBSIR9GaOS7XcLay2F9iH9+p6sTAd6OMnj5aXLEQCO9ztMcYxLWClj3M0wcWe2d2l//aRIZdenikQ2CfwpJqgI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750167910; c=relaxed/simple; bh=tjdMx7JP9WA7qfJP6WQILzoRgg1qDowYbkmxAwje2UU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hKy1t5EPUzh1ejJP0ut/UggAwqsNxMBvv0bT7NxcXeOTtPm+0+G43TPMTD8tsWd0691W+wYomHp4Vu2xKu7RiH26xGapNmUmwsxaFI+ZdcknszX8H9vDiK1cxqrq1cyF+wqWQfrzm+jivnMkXM1vKVarlQXNhWtAxv1HYcNrjdA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=CzPt9P+5; arc=none smtp.client-ip=209.85.128.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CzPt9P+5" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-45300c82c1cso18984455e9.3; Tue, 17 Jun 2025 06:45:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750167907; x=1750772707; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=49FSPtlcKL0gc4JMv+U7rRPko4PCd0GRAj32NmJNos4=; b=CzPt9P+55ApZkEBhKeNamRzt1M9M8jEPjXhkPOgN/Pk3snk6b+xPTVh6BV9twnZyd+ XmILS1+YsTEr+0y42WdKsMtqCzGv7oNfskOajCEhbo9br+8lNA52mSygiNXgipYhs9/x iXyujjotS772BcqVDX3YhxDIFmdF+IChl4oysBy9IqR0yskO9Cq6AOeN9E+n9WOHerq5 mCADYGv9FfEuo7OX9x/DCKvnAyPvewkBcok4EZxefIadqFYmpgJJE+ZWcLSH556wOW5T jRUbxFwb6S5/CPlG6l398oKGljsRBplmHNI2mdcJ/gAiqokHa8DfW2z6kZdGWX/OWY0C uXaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750167907; x=1750772707; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=49FSPtlcKL0gc4JMv+U7rRPko4PCd0GRAj32NmJNos4=; b=vkThwDRK1hyk1w11zqK5Mvqg7A2bcVzrakerD6UxQT+SMicPl7x39GIXU47OhpRpt9 wYwEyu3UmXYUBCsG7sdgySfGUYgR8/V5u8MzyNS2Ilt4Ipio7L8bEl5rA1+5eJNnZlCd ENDpo1Pqh7eSoLWWZ2JJApDROzQv7nf9WhBBMcVfXXA7xqMTNgV6WT7GEIbkMGjqkuoO 7nwhfDiVYQ0poWLKSO47qn8VcrFgQYYLNK2W1IfJj4ree5r4o4mxcnroQ/Dne/HisgEh 2/LlzrMOqnFJn+7lOmSe+9efFq9unbnKbFM0lScYgtFuDoPy+hFzESpdBmEXV8a2zU0X hazA== X-Forwarded-Encrypted: i=1; AJvYcCUn4FfIkdqOhq3qzU3k8bciZaYiLCD2iVIEi5k2pyf8rgM4RqusGdWQCHyLaeNc0/G2iCHBbKLPbh4xKKg7GELK2zM=@vger.kernel.org, AJvYcCVPIJVBtjIuEiYOrsfUw9NTqmUdiIynCwpQH29XwynEoXNsePlUNfmE/U9IyZ7o8gqCGXQ9FXuzTSa+tZ4m@vger.kernel.org, AJvYcCWpkLMoS/VKiE/W24gNZWPoUgnbxm3Z5n0YwXTyLf7HpljQ/HIm9+vHi8M33cVcZueFLnLR+ZeJmz4m@vger.kernel.org, AJvYcCXzbMZvoQJC5knjQ6wGQnbT8fCz6MDWGnjnSUgBUmzugfZMnA82Rvc+vGaGv9SAjQoVsb6Wag5LwcTl6kma@vger.kernel.org X-Gm-Message-State: AOJu0YzxKSPX++OowiFLIE4Jan/Pu9DG4WL1NvzWyN5ix0WajI045/+k Bv7yvIA742NEDwEX/cTkugMcOoFgy0JFNPxnahV2ECkKHyzPkd0Nbrpx X-Gm-Gg: ASbGncsu9j/DqKrzItR0mG8ktPLqz4nT7+RF/8xwv1YaFdKhqWFTSzCPBfwlQCdBUbq fGoK5dtV1jNVA0SZJ6Rnebcej4X0VNB7Y1hWS8BbMINZtmEUhALLGQy2PIkLlb7Q5F2g1DtwhMx 3efCpW+Il0RYqY1S68aLC+sH8wsJBE1El/LE+ujojp2rGTzI3NscFxgic2+1aQkOcYIWwCaSCPK QC8/+iXf5f1gqjK4icdbJ9CtcDK+TD2jKpL1ZRZjUasrJD+WUPKzcCEEeS12bxQmJ1LG8mUmlEQ GDG43S/XzYlaU6pdNA6W0Bp5GQC1RnlLQW6SaEx9XTsSQwZOh3gDONk56RQng6xd5AugzQm6JKI 5E5khNN2ld+o= X-Google-Smtp-Source: AGHT+IGse8XFsoUh6fMQBcNMM9Sf+3vi5JtHZdT76YAwamnppyqyoyYz15avA1Klfl6ft5GN31V4DQ== X-Received: by 2002:a05:600c:620b:b0:450:d4a6:79ad with SMTP id 5b1f17b1804b1-4533cb4bea8mr118623195e9.23.1750167906835; Tue, 17 Jun 2025 06:45:06 -0700 (PDT) Received: from iku.Home ([2a06:5906:61b:2d00:a081:30f1:e1c7:6f28]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a568a54b7asm14239728f8f.16.2025.06.17.06.45.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 06:45:06 -0700 (PDT) From: Prabhakar X-Google-Original-From: Prabhakar To: Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Catalin Marinas , Will Deacon , Magnus Damm , Wolfram Sang Cc: linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, Prabhakar , Biju Das , Fabrizio Castro , Lad Prabhakar Subject: [PATCH v12 1/7] dt-bindings: serial: Added secondary clock for RZ/T2H RSCI Date: Tue, 17 Jun 2025 14:44:58 +0100 Message-ID: <20250617134504.126313-2-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250617134504.126313-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20250617134504.126313-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Thierry Bultel At boot, the default clock is the PCLKM core clock (synchronous clock, which is enabled by the bootloader). For different baudrates, the asynchronous clock input must be used. Clock selection is made by an internal register of RCSI. Add the optional "sck", external clock input. Also remove the unneeded serial0 alias from the dts example. Signed-off-by: Thierry Bultel Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven --- Hi Rob, As mentioned in the thread [1] below there are no users of the RSCI binding hence this change doesn not break any ABI. [1] https://lore.kernel.org/all/CAMuHMdUThuWxxznhjvcn5cOFCWOkb5u-fRYwTOoenD= RY=3D4H6FA@mail.gmail.com/ Cheers, Prabhakar --- .../bindings/serial/renesas,rsci.yaml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Documentation/devicetree/bindings/serial/renesas,rsci.yaml b/D= ocumentation/devicetree/bindings/serial/renesas,rsci.yaml index ea879db5f485..1bf255407df0 100644 --- a/Documentation/devicetree/bindings/serial/renesas,rsci.yaml +++ b/Documentation/devicetree/bindings/serial/renesas,rsci.yaml @@ -35,10 +35,15 @@ properties: - const: tei =20 clocks: - maxItems: 1 + minItems: 2 + maxItems: 3 =20 clock-names: - const: fck # UART functional clock + minItems: 2 + items: + - const: operation + - const: bus + - const: sck # optional external clock input =20 power-domains: maxItems: 1 @@ -60,10 +65,6 @@ examples: #include #include =20 - aliases { - serial0 =3D &sci0; - }; - sci0: serial@80005000 { compatible =3D "renesas,r9a09g077-rsci"; reg =3D <0x80005000 0x400>; @@ -72,7 +73,7 @@ examples: , ; interrupt-names =3D "eri", "rxi", "txi", "tei"; - clocks =3D <&cpg CPG_MOD 108>; - clock-names =3D "fck"; + clocks =3D <&cpg CPG_MOD 8>, <&cpg CPG_CORE 13>; + clock-names =3D "operation", "bus"; power-domains =3D <&cpg>; }; --=20 2.49.0 From nobody Thu Oct 9 13:50:22 2025 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (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 4FE502E06DE; Tue, 17 Jun 2025 13:45:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750167912; cv=none; b=MXFZGE19/MfV2EnDggLudSXxH5NE7i5NM17Kmu9kup4bDeb/bwmmgR94KE7j4BzgClp4prGNuZPjKKnGwq+1ugELOH1dRowlsszV9BnQlpE/Es/Xj0qXlj/KPjddi8SkOvdfdjUaJt1AWmM+kT/C8UnB/3c0lt4wmaKFojsh6hk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750167912; c=relaxed/simple; bh=+rhHHxGq9aLHFzqgaRAsuYIS2MmR8DESzZT4/MAkKUE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=T0KIMAmyi+LxlFoqtVp4jM0posDqfTJRToxH5kLjtPfj63ATndm+TTSWAt3XAPAOm3xIVmb6EpPqoh6Hvx2+CpjlyAbVREONf3vFL09ouP5Y+dbEtOkcLD0t9DCeIHh+BbFk9WIfrzXbIVv7iWGCCgw6FrJ/FqcI5GaoQt4VLG0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=W1CvGwbm; arc=none smtp.client-ip=209.85.221.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="W1CvGwbm" Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-3a588da60dfso561209f8f.1; Tue, 17 Jun 2025 06:45:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750167908; x=1750772708; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=A8JJN4D88g5LZysAtEHW8oNqIwXChQoCpcV9xwGdAP4=; b=W1CvGwbmHHsxAFHERvdZWnG0BvywhkoGs/XhKABGNiHJDyrVXaYc6Md4calU18qBvt cC4xe06h4qcfxpchTNrkO9JN3J2al0cLzge6AO13mMZ+rXSe8hvIVRsze/OamOuh4swV hd+Z0fJtK/oXdNrA84ob0dDo+li3G9IkfA6R7azAAJU0nvytDo4FrQJ6pf1xYpFxTDWI Eq5/T80AGnCQSTuxMAq8+rPBG/5bjFd6++vAtQEMJ44nnvwfqXm19C4/B9D6Tw9rgOhV sIniQelaJVkdzwgv9t+U+FEbKJXPKLv0ukOTcq88b0beWzAFDVyf/oBZ5roVSYb+qBPI Z50w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750167908; x=1750772708; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=A8JJN4D88g5LZysAtEHW8oNqIwXChQoCpcV9xwGdAP4=; b=aD9Iw4k4kNmCvi2HsxM+Of3HpqqVLJv2jtFPtaIGex5JvFkCd/T5MyRsxhayHFrmJv MH1RDc8TBWo2KmsR6nLr6ZVzMo94uwY2dcudHzKM4um0PTu4f71L8DL+BikXPUz2TCTw Pugq50omXOqFXqn+EzgYZClmFWE/8PH4Sdz0Y012K+2ws0DJpHv7IHkFp3zr5b9sduAT SROOTwbY/pR6x5e0WEivH54IWEZ/ygm2EmsHljceGF5S2KDF6coQkC4x/euRPdHOjjFH GuAgSFk+2G/lrUbpDWJK/IpmZVUOdkANooyX4oivnN/4CAaga9lF3fF+XVSr9zFBiq4j mjpQ== X-Forwarded-Encrypted: i=1; AJvYcCU3q6PMnIfnxpEAuHjVJj0H27NorXmsmv1HlQ6QfapG0Scrt+FO7jRaw4YLSeG8g3xmufxSlmP+DB0F9zFeNexx+QE=@vger.kernel.org, AJvYcCUsF7btWy4T1+N18Sedzqp6YcuoERVl3sybhg0SkpMmeaNw7t37lKIgFGwkjmf825uAnjGPWzuNpjpNe+08@vger.kernel.org, AJvYcCVOevUvAGBqY3/oynhb9g3AIR1FffKt1Licj8mcsa6ZBuOTuWknbvMO27JhEKaMApZvq1OrvevAqG0dGuRR@vger.kernel.org, AJvYcCXW/T2yAUlEFD+Da4o4JqvimYhCG2HluofBPCN3Y5X3zLClTChYIh0dKTlYTX7v/SGOfypydLphC5mi@vger.kernel.org X-Gm-Message-State: AOJu0Yxl4ardCC3CT9uWcWhLplOlKrnTDntBVwUAallHk8HGG8/thAxu eWKaVod9ezLaaU961gJsnGTsj7Hsue5vTCS/OhYTsuPmgmftg8BBX7Yr X-Gm-Gg: ASbGncvYWzFjkrpStEoZbetWbvRuSSxSgd9f2krJjoBTpKt8t2u+hfnQcvt6rTMkvho cZ3RUagZCWzswvK3DjJJld8vGhVm1g397Gux81s16joNYeh6l7JjdDY/WEn5O0ysZyseXyrsIrW KB7l6exU9joDxv7DeEHhD7bWKltDSCxI6utDdj/eBbSJvjwi99/z8eULabL88U8kH6uo92YY9b3 evDlD9yo7jmPSEGVn0deAjXx2AzffPV1UFnJWnJOe3GhSSmzm4RBPyLFK82GIsiQSsKqaz+s7DW KYmbP3LhgTcZfVwTgDvbdYh0AW5b2eBsxysCqgyxKMl5LYoYvFqfh7mel5eexhkWUl2Q+60iCgb IQw0zqzyJRFveLgbEDxd2CQ== X-Google-Smtp-Source: AGHT+IHx7+MxOtQIlo3hCXb9uKaWLaaMM9I4c7QG+YXyxr08bo4gUYk8w8HO7kGmwusFdh08dsgFpQ== X-Received: by 2002:a5d:5f4e:0:b0:3a4:f52d:8b05 with SMTP id ffacd0b85a97d-3a572e79d6amr11446870f8f.35.1750167908305; Tue, 17 Jun 2025 06:45:08 -0700 (PDT) Received: from iku.Home ([2a06:5906:61b:2d00:a081:30f1:e1c7:6f28]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a568a54b7asm14239728f8f.16.2025.06.17.06.45.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 06:45:07 -0700 (PDT) From: Prabhakar X-Google-Original-From: Prabhakar To: Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Catalin Marinas , Will Deacon , Magnus Damm , Wolfram Sang Cc: linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, Prabhakar , Biju Das , Fabrizio Castro , Lad Prabhakar Subject: [PATCH v12 2/7] dt-bindings: serial: rsci: Update maintainer entry Date: Tue, 17 Jun 2025 14:44:59 +0100 Message-ID: <20250617134504.126313-3-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250617134504.126313-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20250617134504.126313-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Lad Prabhakar Add myself as the maintainer for the Renesas RSCI device tree binding, as Thierry Bultel no longer works for Renesas. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring (Arm) --- Documentation/devicetree/bindings/serial/renesas,rsci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/serial/renesas,rsci.yaml b/D= ocumentation/devicetree/bindings/serial/renesas,rsci.yaml index 1bf255407df0..548225e509e5 100644 --- a/Documentation/devicetree/bindings/serial/renesas,rsci.yaml +++ b/Documentation/devicetree/bindings/serial/renesas,rsci.yaml @@ -8,7 +8,7 @@ title: Renesas RSCI Serial Communication Interface =20 maintainers: - Geert Uytterhoeven - - Thierry Bultel + - Lad Prabhakar =20 allOf: - $ref: serial.yaml# --=20 2.49.0 From nobody Thu Oct 9 13:50:22 2025 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (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 874D02E425B; Tue, 17 Jun 2025 13:45:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750167913; cv=none; b=h+euj4TFvNFWmuYXidyuYURwCXUWMOqmWs0KtvQSLI5rXXFV7gXGVWAeciL2QKixGOL4S/rreViIzR5e88yOw4UZSSqg0czlqICYhWlQe3ad3kveWLM/FgiLbK6+EFoM/K4d+zFSMdEJJGYVa0d0ja4h4JeVE1imxbS40WbvQ3U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750167913; c=relaxed/simple; bh=YpEiNFEaBVckSeb9YBuOTClHD/pwWP0CyEjZlUPflu4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hDImDmTAwzhkRDccd7pyHrzkGzzovjROR/JOQylIN60IAfJoNSz+EVWNHHZpSU86K6PlATbpQ6LqANgbeVdaDFgqGjZwHMvN0dAf2ZvAv0TN9LSB/s3qubKi/cIDVIs00DwKFYaBUqeG9V/atuqWbeWK2Vv3OFABpcLHLL6HfSI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=LaD6bAFC; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LaD6bAFC" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-43edecbfb94so64317505e9.1; Tue, 17 Jun 2025 06:45:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750167910; x=1750772710; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5h9k35W8VUkZ64zZtOtJ4NycMcBJ361EMKMeseKsgfc=; b=LaD6bAFC90A3ux8uK/2wjIWMAB8mbnfGplXKV4Ls3aqjOJEqF0HI0jnM1G5cm0SeLE jeWnyqgQ1IVVTu49YNF381T8yIIQdz0ULnkr3Idoh9z+F6nEVbOrZWrIv4SjmYe8wLli wXXeqSwVbB9pqAhsdq/MpX53u9NqaIjZUaRvyHeVO7dYdWSpSoCKJnqile6URIf+hLTq bLk0amCI+kX724g3GuIxlMQHgo2WCCkslH/ICwSsyGiqSuhhWFDowKnBRQOmaMfMLxwS WQbCOEdv1Gj8kYLm8Dikq743RAeNf50FoD8gqV8jcII2KlIs+HcTaJpGtJ8bYPSGXSPM f+pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750167910; x=1750772710; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5h9k35W8VUkZ64zZtOtJ4NycMcBJ361EMKMeseKsgfc=; b=mZ5Qg/mHXB8CZmMM+YZSYdi0zHZxtVeFPtqhSmtB/l5TXmYYA8NQOT4Q8fIDbpNhLg 28kLD2n3Cf9H7drsDkKR8CrKsd3lxUXqXEjGaofN/Wg5lXQb8zp9/9iSzHuuQxohKDY9 t1Id1pNdyqWXW6mcH/Eh1k6G7t8Xlanjc6UwKamNvsljVeA4lsjbJDf3Qe/vVW5YeB1v 1vZPWe1eN3SKEMY4NhjP0tK4+whewt2NTu4NUGu6wZURBNexDs8ndrOHw/iqRXXeV2d8 /GrFGsW9YnWMs2w7h16qO1CtDUgL5PPN4IX+mPeaNwuVd0o4q7N8bLMAV3nSpeJCglQ9 P+pw== X-Forwarded-Encrypted: i=1; AJvYcCVNp8ozbX4DuPN7fxd347er6KdKCmHZvYN+8THURURTqsnn+4IP5yNxwzl2uQWiQb5/Q81rebyZbAUw5IQ99liiqBQ=@vger.kernel.org, AJvYcCW8ihl/Djufg06EsKu6suXmRaERecRUeF7HLvj2DxkW/I8WIQ01sxMnRDCmg53eGIWV6Dr+4KpqdhtnZC7P@vger.kernel.org, AJvYcCW9kiY1Wzr9tpeF7hJ9xdwT/nnUAopWlpKxRC/VrfvuE7hAlXX0uLFMF/CTX9p2pEOK5L4uThNM/QlF@vger.kernel.org, AJvYcCWP8NXkRLQ3evn0vfzgcsC9q+jjukr967VluEGWKq+xdoRa/FeRHsVs7qBoKM6lo5AUx6kEpP01oOwfxWUG@vger.kernel.org X-Gm-Message-State: AOJu0YxkkZqUgO4NNmObeRC78xfJtsgR6jlR0gFURKsv0K3rXvZpYB7d k5SDV43AaKhUWgd25nbFZ9QTxZxON7WTHUZdgM+16flJ8NaVF/S7wv01 X-Gm-Gg: ASbGncvQlU9swdfFdMyaWV6DHI031si+BZulM98GuUzvVCerQYmbXrS5T4J9sJT7Sxv YnGiKMS86tfIWwUVyMrFrYmX7U562FjuenmF5GICGKqbM8B6gv0QuWJMoO4f9GQnqW4olw0l1N2 GU/fnxS3/AHEFTaNfzNxi1SoAphoHvLz5h7qmJPIVMNa3TDVw59zLRzK/iRgqV/o/UhAc5iH+bo oF3NU0jvIOTWD/Rh9Z3GHFRkrjB9CBwUlKvXBPNfgsmg6WImQmioBVWtdaHLRITLI96bPQP5OVF gK11YejAty7OxtZlVhE0oUazwZr08o9E7X111YO+qy+3xYNgiYU1u4EOkoQsK2TMRvPDhoQPapi tWqHy85vr23Q= X-Google-Smtp-Source: AGHT+IHrFwv0zGTdQiCUWhPQoi5s2M4Vk3TK1s6lXyW205P9aB6tfhvsg0QfD5fzGErUUi4TPkOybQ== X-Received: by 2002:a05:600c:1e1d:b0:442:ccfa:1461 with SMTP id 5b1f17b1804b1-4533ca6ace2mr138962895e9.13.1750167909601; Tue, 17 Jun 2025 06:45:09 -0700 (PDT) Received: from iku.Home ([2a06:5906:61b:2d00:a081:30f1:e1c7:6f28]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a568a54b7asm14239728f8f.16.2025.06.17.06.45.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 06:45:08 -0700 (PDT) From: Prabhakar X-Google-Original-From: Prabhakar To: Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Catalin Marinas , Will Deacon , Magnus Damm , Wolfram Sang Cc: linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, Prabhakar , Biju Das , Fabrizio Castro , Lad Prabhakar , Conor Dooley Subject: [PATCH v12 3/7] dt-bindings: serial: renesas,rsci: Document RZ/N2H support Date: Tue, 17 Jun 2025 14:45:00 +0100 Message-ID: <20250617134504.126313-4-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250617134504.126313-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20250617134504.126313-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Lad Prabhakar Add documentation for the serial communication interface (RSCI) found on the Renesas RZ/N2H (R9A09G087) SoC. The RSCI IP on this SoC is identical to that on the RZ/T2H (R9A09G077) SoC. Therefore, "renesas,r9a09g077-rsci" is used as a fallback compatible string for RZ/N2H. Signed-off-by: Lad Prabhakar Acked-by: Conor Dooley Reviewed-by: Geert Uytterhoeven --- Note, this patch was sent out individually [1] and is now merged into the series for convenience. [1] https://lore.kernel.org/all/20250609192344.293317-1-prabhakar.mahadev-l= ad.rj@bp.renesas.com/ --- .../devicetree/bindings/serial/renesas,rsci.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/serial/renesas,rsci.yaml b/D= ocumentation/devicetree/bindings/serial/renesas,rsci.yaml index 548225e509e5..f50d8e02f476 100644 --- a/Documentation/devicetree/bindings/serial/renesas,rsci.yaml +++ b/Documentation/devicetree/bindings/serial/renesas,rsci.yaml @@ -15,7 +15,13 @@ allOf: =20 properties: compatible: - const: renesas,r9a09g077-rsci # RZ/T2H + oneOf: + - items: + - const: renesas,r9a09g087-rsci # RZ/N2H + - const: renesas,r9a09g077-rsci # RZ/T2H + + - items: + - const: renesas,r9a09g077-rsci # RZ/T2H =20 reg: maxItems: 1 --=20 2.49.0 From nobody Thu Oct 9 13:50:22 2025 Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) (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 1B2382E764F; Tue, 17 Jun 2025 13:45:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750167914; cv=none; b=o1NmCkbjd04W9ZxnK56yfagD1mJdO2gaYkBUIQZzxgVLt6Mg9kmKejZddrQQ/IxqclzpfoGTB3YEph5fyCkpFDYN9e+e6ZX5ubRn+1H8iEwy/wJXhIiuUpk9Rsw09IopRTPyS5Z+YThdQ6NW1y4WRQwyED+QbtuD7HK21U4scus= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750167914; c=relaxed/simple; bh=32vaS3oDDxD9wWwCFqvRGlf6S2LFX05pBvdPaXOd9PA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=d4zvxSp55qKYUA38F6JyR7AwONj+yklQpamLDp1lFF0JqYEFXjx6rgAoI5ssCBQP595jovZgNEWUz6zmXPRXcUV0fq68zY07qBWWQ8747BsSX4ylXYTTZkDTRvYNoGsEUkXw4MQXmH+JtoJ+GRnCYLJXV2YhQ9rWB0goNFunYVs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Pl5EmfG0; arc=none smtp.client-ip=209.85.221.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Pl5EmfG0" Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-3a525eee2e3so4372253f8f.2; Tue, 17 Jun 2025 06:45:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750167911; x=1750772711; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BAqNzOFflinZMwWtXBZIkd7G8+XaYao2cwGX1v4/ej8=; b=Pl5EmfG0bRHzPKKgJvYKHkAP+1hI0lNQVnQqyc6fzBqCqFpG6RDCIjwvKHom/3UcVH cKpjSl8cU8jKu+txWG2AT1Ui8yDRoauKK5+sI4b6JW0fkBvoXqYr5oea0Cq3r/3Iq7Ll 0647CyARml4rVb3oQMO6k2uGZgLTkgono+SWSYpzPMIK1kSoUtFSacyV/hyJtutgnBb9 AdogPl3HXS0TgqQBkoOf4GryvKQcAWnMbD3efFdPuABkPmQxyv/Dsdl2rIKT7u3mCyQT XgGShMhMBUNjrlp6Rut6H3fKHkIfE7NqvtEqSaUWxRU59gTH+QqeF0xYoQH+57ixaLpH XWQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750167911; x=1750772711; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BAqNzOFflinZMwWtXBZIkd7G8+XaYao2cwGX1v4/ej8=; b=qm0PtLYATbRu9Gdhwcqs5VfM1TXkURW9NJ1x9DfSBv6b0auepQqQW/1OjEzEgqDlIt ny8vTseBdL0R9PeKXj43/alTIXlMpmwXiOcNYUBnUENOhoXnmK5inleea1MhOKAgVlaF 6biB1mG8Wv5Rl3RcZR2ns+M6cdJXWuM3XtClxyBDn1lsp4bJ+ws07Fbove2D8/ouclhx FNAeIO3wX6+IMSb0ycDbvTkYw4/7muGHILXk/himWxCXJkZ9EUBMMbbi+8Z6nOoBDJrP MHtD39afMUMinyPe5fR6sLuvfaIDKR4TL1xHJNwOhC2gLS1xU6E3XySp9ffFIu5/wTEU FDTw== X-Forwarded-Encrypted: i=1; AJvYcCUmT9vgVrpmnAF0+W1Wl3xOmwDjosieqUllLoCS0Q4ZvaOvv14ieOKRoffMWy7/rqIQf3oUc/SvzffO@vger.kernel.org, AJvYcCVI1Zxfjb5xZ+Gm/v+aVM/uV3UunOey/Bu9r6n1VaPheIDWRhjORNDvd/5/rj92rY1ZLQap7TBp9eg7yd356rWQHrk=@vger.kernel.org, AJvYcCW1oBEntu/wZ1Z3ik3TQzSpfe+hwLLLMOt9iyalAFOjmLX/EPJ8KRG3kg4XVgWCsEzCgES9+R7PYws7IdwY@vger.kernel.org, AJvYcCWviDRnE40Wo0/4e034xB65/+qIkcFHLfoNxeMNJnr/cc9oCHkXs5fTZiVtK+FyqZBytog7EYrZCVsSkzS7@vger.kernel.org X-Gm-Message-State: AOJu0Yzkysxvhnf6EEI8sh7YrnMMIcV6brWJ+XHiU51lQsF4b65cQjQz 64cVmiGJmg/8jvtrHXAy1IfvN0mUJZKolX75TuWPD0ro6BO4b2xY3iUW X-Gm-Gg: ASbGncsWKnBnZ0YJXvt1OeNfdwFJd2hU048E9WO1u5xIXk1mCNiYJAPAKui46EHT4S6 CJZwWIupp3iIaStXtjqxG5Efwt7KJitgPYkZCNOcXcVjoVe2PIRtUmiPmt7u3vjRrmVxx8g7KcA 6UhWrk1bvSXdCWsn0xc07AI3Hc0SyrIQtGRBS6km/9NKmUFHmpTGPozfD2FDJhSAFJO4HZNo02N U7QKo+DB//ZFioCoZcjLXdtuG/nvl189IfzV+wxQlsgRMztWno7618O+UVD7H6xQVWZ0DoViRxV H8kAy/pK3uyjrmGlQxG730prH5DwTMz32e3Yky7hgbcePIa+TKBrEK5GY3Y7gMo+tEwPHWUPWV3 dBFGbVZNFPWw= X-Google-Smtp-Source: AGHT+IEIBy/qhhThKzZjZs15iuzXDn5mHLJsctTHGEcXER4Z289sGD5otxtVYLG/NG91JzFkXG6SQw== X-Received: by 2002:a05:6000:420c:b0:3a0:aed9:e34 with SMTP id ffacd0b85a97d-3a572e92ff4mr10040312f8f.48.1750167910898; Tue, 17 Jun 2025 06:45:10 -0700 (PDT) Received: from iku.Home ([2a06:5906:61b:2d00:a081:30f1:e1c7:6f28]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a568a54b7asm14239728f8f.16.2025.06.17.06.45.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 06:45:10 -0700 (PDT) From: Prabhakar X-Google-Original-From: Prabhakar To: Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Catalin Marinas , Will Deacon , Magnus Damm , Wolfram Sang Cc: linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, Prabhakar , Biju Das , Fabrizio Castro , Lad Prabhakar Subject: [PATCH v12 4/7] serial: sh-sci: Replace direct stop_rx/stop_tx calls with port ops in sci_shutdown() Date: Tue, 17 Jun 2025 14:45:01 +0100 Message-ID: <20250617134504.126313-5-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250617134504.126313-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20250617134504.126313-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Lad Prabhakar Replace direct calls to sci_stop_rx() and sci_stop_tx() with port ops callbacks in sci_shutdown(). This enables the RSCI driver, which reuses the SCI core but implements its own stop_rx and stop_tx logic, to reuse sci_shutdown() without duplicating code. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven --- drivers/tty/serial/sh-sci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 1c356544a832..5c4283ce542d 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -2289,8 +2289,8 @@ void sci_shutdown(struct uart_port *port) mctrl_gpio_disable_ms_sync(to_sci_port(port)->gpios); =20 uart_port_lock_irqsave(port, &flags); - sci_stop_rx(port); - sci_stop_tx(port); + s->port.ops->stop_rx(port); + s->port.ops->stop_tx(port); s->ops->shutdown_complete(port); uart_port_unlock_irqrestore(port, flags); =20 --=20 2.49.0 From nobody Thu Oct 9 13:50:22 2025 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 106742E92D1; Tue, 17 Jun 2025 13:45:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750167916; cv=none; b=cKdOpBUMEBm4MhXYmD/5TRPzKO+7NuUlIIFPCD7HLWewUKlNVPhD7t75Mfd3cVzNdHBBi1Y06s577bbBOAjOq0l/bVkGxzdMtTN90qJBSpyRaakFZlvBe5xgT9ZD/b6c9GwDYiJzCwkf0oUHWAyysDMatmToxjD1YpYgR09NtJg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750167916; c=relaxed/simple; bh=DGAkRyboVXBv9Rnv9mpnfkc5GTC49f99KSRvB2i9P+4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oeLhJ0eOCa//AghK7F5mp3dCL9QlTI2bvIm94w6zir5tlsGrV7P53ss8zQep1ST7YHkubw65ImC2UShglPZ2p93KsRuMw3b//RkW/FtwIuR2g16l4+Lx1Zn7cmpntlYxzfZbEx6xyM7Ngrpc9ikcDeKjEMDL8rfHbfKI51rRweg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=i5OEMA7Z; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="i5OEMA7Z" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-450d668c2a1so45729085e9.0; Tue, 17 Jun 2025 06:45:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750167912; x=1750772712; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ue24pFg1jyCcA3ws3iASJJ7hGXge2yixLdFycY9/Sno=; b=i5OEMA7ZttvHIetkOrkFv1IVn6xDiHj/apdVZozvxy90cpZQY1cFW/vtXlK/Gkn4GW WOc2WpmCYCS6smTgvVVgao3EOT1jKpWhjxA7Yeibrg6SbfK2PHH9Vv3HIsTJqJk2KH4b Iw8DGah0y9RsZyDjL4HD2nZq10jYbqCZIH16uHYV+PsUOkN4IW7gdB7+xO3rveFyiMeF rBz+YlyhoUHE0uLogqyPjmPw79rOLj76l/a2baT+Z3YrtuHC9EjsFCwLM+1I0Yg97I3m erxwDaMj33B2gvj7pdhgyr6lr1SPMNwb+9vTGeVfcVoVXnwi04w5USOo3EaWjqsmgMkk Q5Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750167912; x=1750772712; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ue24pFg1jyCcA3ws3iASJJ7hGXge2yixLdFycY9/Sno=; b=dNEDG4mRzyAeCXOXOG3OUzhZuUxYuHpPoZ9CF/gXo5HBwp+W2bOt3JnU4DwSRFeler 1Zv+TJHZbgG/cOoXU3rrrRFXm2ajyiAWwkq2RWU4segR8PE2lQSV16WgkDidxk4hJUb0 22L2f7fUgtZ5mBFW4rwD7ylA1lprWDvbG8IW8HWPqC86njlNV3SteXSrVEQA/EiC8gBq G1zRmipYE7UgUdjoRXL+VpEiS4C4xC/dtKUEGW/ZyYWWD1/ByX74mkhMScBjle6psH21 llEae88g0u/uTgaOxFShM6wb1+nkRrNzDBX/qF9tiNWe4vRt9NEvt3cxocWa3N0CmxUN lgMQ== X-Forwarded-Encrypted: i=1; AJvYcCU7sQmSI6l3EXpQRTTKgFM3voOouovvof9GyMtDzpghAJQMaKY9tTGsx9LH3iXqkFmjAyImilcaW9Ua@vger.kernel.org, AJvYcCVTvpRJ9AzK6PCtzKIxbomhx1NTOFbqxoSHXzWITN2HEMwMJqKm7wRNw9NiaNSMtZta1epBK0QmxcGoj/sG@vger.kernel.org, AJvYcCWC/91Jup+Xbi729YUnxPQ4sj4O3mT9ZA+TdIPutGKhWUL8BNX75hJcomEvIRWJv2RaaXXQ1BwSpXePETe+iZyU+h0=@vger.kernel.org, AJvYcCWrtTEXKZTkqt4vICQfLcKsAUC87tWpTVJNiWmBocba3KB1LbyukgOsA4FSLhr2eiGrsXTfE1mBE+UPVuMJ@vger.kernel.org X-Gm-Message-State: AOJu0Yw36fThbsyxME0bcG00Gw96vJLb0U2sBcmbEmUr1FVd0RkyrSaT U2fsbzr91NPdtHfeWSDwUb3hkivnzvVWvP6M5xU7KOD7YTdOtVY/J2mj X-Gm-Gg: ASbGnct9blRuNKKoCqMRtvuY1DQH7TH5KTC7sKT79VPfwy4e461PKY7rHWwi5jeT62H oCNbWkKHDqyzDSM2Q9LQc+kGlW6crLJT7WDxYxqc2VE+YDbYvzKtuhayJtJagIhbIZwCFAL9Zm3 OrTsFSzL7K0H3AYOffjNv1I8sRY5k3O5kYQLnjoQ2IsVBJkRLQ7oneYekEPMj/XEHC67lTXSY9R KN2ORuakPYDbZd4StxdumubDeKrMVVdVC1scrjT8NLObyIFav8oY8vHtFyQUYVB+cbE5UqoXopv uixPjAAA9s0jTVDweaYKNc9ta0gSSQOGs5xSF0x0dH3qqcXfFTczQay2fa3RjsAolqEv6wk4aua 5O8LdY/TUM+s= X-Google-Smtp-Source: AGHT+IE1aoKv5a09Io8oJ6CkBijarpobW2t/y2akd9EWBr6yVYZ0/zauEgqPBA+P5aXKXLLpPLEZ4g== X-Received: by 2002:a05:6000:2f88:b0:3a5:1360:6b34 with SMTP id ffacd0b85a97d-3a56d7bacfdmr12201555f8f.2.1750167912192; Tue, 17 Jun 2025 06:45:12 -0700 (PDT) Received: from iku.Home ([2a06:5906:61b:2d00:a081:30f1:e1c7:6f28]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a568a54b7asm14239728f8f.16.2025.06.17.06.45.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 06:45:11 -0700 (PDT) From: Prabhakar X-Google-Original-From: Prabhakar To: Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Catalin Marinas , Will Deacon , Magnus Damm , Wolfram Sang Cc: linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, Prabhakar , Biju Das , Fabrizio Castro , Lad Prabhakar Subject: [PATCH v12 5/7] serial: sh-sci: Use private port ID Date: Tue, 17 Jun 2025 14:45:02 +0100 Message-ID: <20250617134504.126313-6-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250617134504.126313-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20250617134504.126313-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Thierry Bultel New port types cannot be added in serial_core.h, which is shared with userspace. In order to support new port types, the coming new ones will have BIT(7) set in the id value, and in this case, uartport->type is set to PORT_GENERIC. This commit therefore changes all the places where the port type is read, by not relying on uartport->type but on the private value stored in struct sci_port. Signed-off-by: Thierry Bultel Signed-off-by: Lad Prabhakar Reviewed-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven --- drivers/tty/serial/sh-sci-common.h | 3 + drivers/tty/serial/sh-sci.c | 159 ++++++++++++++++------------- 2 files changed, 92 insertions(+), 70 deletions(-) diff --git a/drivers/tty/serial/sh-sci-common.h b/drivers/tty/serial/sh-sci= -common.h index bd9d9cfac1c8..fcddf66780c9 100644 --- a/drivers/tty/serial/sh-sci-common.h +++ b/drivers/tty/serial/sh-sci-common.h @@ -142,6 +142,9 @@ struct sci_port { int rx_fifo_timeout; u16 hscif_tot; =20 + u8 type; + u8 regtype; + const struct sci_port_ops *ops; =20 bool has_rtscts; diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 5c4283ce542d..aca2b89802bc 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -75,6 +75,8 @@ =20 #define SCI_NPORTS CONFIG_SERIAL_SH_SCI_NR_UARTS =20 +#define SCI_PUBLIC_PORT_ID(port) (((port) & BIT(7)) ? PORT_GENERIC : (port= )) + static struct sci_port sci_ports[SCI_NPORTS]; static unsigned long sci_ports_in_use; static struct uart_driver sci_uart_driver; @@ -580,7 +582,7 @@ static void sci_start_tx(struct uart_port *port) unsigned short ctrl; =20 #ifdef CONFIG_SERIAL_SH_SCI_DMA - if (port->type =3D=3D PORT_SCIFA || port->type =3D=3D PORT_SCIFB) { + if (s->type =3D=3D PORT_SCIFA || s->type =3D=3D PORT_SCIFB) { u16 new, scr =3D sci_serial_in(port, SCSCR); if (s->chan_tx) new =3D scr | SCSCR_TDRQE; @@ -592,7 +594,7 @@ static void sci_start_tx(struct uart_port *port) =20 if (s->chan_tx && !kfifo_is_empty(&port->state->port.xmit_fifo) && dma_submit_error(s->cookie_tx)) { - if (s->cfg->regtype =3D=3D SCIx_RZ_SCIFA_REGTYPE) + if (s->regtype =3D=3D SCIx_RZ_SCIFA_REGTYPE) /* Switch irq from SCIF to DMA */ disable_irq_nosync(s->irqs[SCIx_TXI_IRQ]); =20 @@ -601,8 +603,8 @@ static void sci_start_tx(struct uart_port *port) } #endif =20 - if (!s->chan_tx || s->cfg->regtype =3D=3D SCIx_RZ_SCIFA_REGTYPE || - port->type =3D=3D PORT_SCIFA || port->type =3D=3D PORT_SCIFB) { + if (!s->chan_tx || s->regtype =3D=3D SCIx_RZ_SCIFA_REGTYPE || + s->type =3D=3D PORT_SCIFA || s->type =3D=3D PORT_SCIFB) { /* Set TIE (Transmit Interrupt Enable) bit in SCSCR */ ctrl =3D sci_serial_in(port, SCSCR); =20 @@ -611,7 +613,7 @@ static void sci_start_tx(struct uart_port *port) * (transmit interrupt enable) or in the same instruction to start * the transmit process. */ - if (port->type =3D=3D PORT_SCI) + if (s->type =3D=3D PORT_SCI) ctrl |=3D SCSCR_TE; =20 sci_serial_out(port, SCSCR, ctrl | SCSCR_TIE); @@ -620,12 +622,13 @@ static void sci_start_tx(struct uart_port *port) =20 static void sci_stop_tx(struct uart_port *port) { + struct sci_port *s =3D to_sci_port(port); unsigned short ctrl; =20 /* Clear TIE (Transmit Interrupt Enable) bit in SCSCR */ ctrl =3D sci_serial_in(port, SCSCR); =20 - if (port->type =3D=3D PORT_SCIFA || port->type =3D=3D PORT_SCIFB) + if (s->type =3D=3D PORT_SCIFA || s->type =3D=3D PORT_SCIFB) ctrl &=3D ~SCSCR_TDRQE; =20 ctrl &=3D ~SCSCR_TIE; @@ -633,21 +636,22 @@ static void sci_stop_tx(struct uart_port *port) sci_serial_out(port, SCSCR, ctrl); =20 #ifdef CONFIG_SERIAL_SH_SCI_DMA - if (to_sci_port(port)->chan_tx && - !dma_submit_error(to_sci_port(port)->cookie_tx)) { - dmaengine_terminate_async(to_sci_port(port)->chan_tx); - to_sci_port(port)->cookie_tx =3D -EINVAL; + if (s->chan_tx && + !dma_submit_error(s->cookie_tx)) { + dmaengine_terminate_async(s->chan_tx); + s->cookie_tx =3D -EINVAL; } #endif } =20 static void sci_start_rx(struct uart_port *port) { + struct sci_port *s =3D to_sci_port(port); unsigned short ctrl; =20 ctrl =3D sci_serial_in(port, SCSCR) | port_rx_irq_mask(port); =20 - if (port->type =3D=3D PORT_SCIFA || port->type =3D=3D PORT_SCIFB) + if (s->type =3D=3D PORT_SCIFA || s->type =3D=3D PORT_SCIFB) ctrl &=3D ~SCSCR_RDRQE; =20 sci_serial_out(port, SCSCR, ctrl); @@ -655,11 +659,12 @@ static void sci_start_rx(struct uart_port *port) =20 static void sci_stop_rx(struct uart_port *port) { + struct sci_port *s =3D to_sci_port(port); unsigned short ctrl; =20 ctrl =3D sci_serial_in(port, SCSCR); =20 - if (port->type =3D=3D PORT_SCIFA || port->type =3D=3D PORT_SCIFB) + if (s->type =3D=3D PORT_SCIFA || s->type =3D=3D PORT_SCIFB) ctrl &=3D ~SCSCR_RDRQE; =20 ctrl &=3D ~port_rx_irq_mask(port); @@ -669,10 +674,12 @@ static void sci_stop_rx(struct uart_port *port) =20 static void sci_clear_SCxSR(struct uart_port *port, unsigned int mask) { - if (port->type =3D=3D PORT_SCI) { + struct sci_port *s =3D to_sci_port(port); + + if (s->type =3D=3D PORT_SCI) { /* Just store the mask */ sci_serial_out(port, SCxSR, mask); - } else if (to_sci_port(port)->params->overrun_mask =3D=3D SCIFA_ORER) { + } else if (s->params->overrun_mask =3D=3D SCIFA_ORER) { /* SCIFA/SCIFB and SCIF on SH7705/SH7720/SH7721 */ /* Only clear the status bits we want to clear */ sci_serial_out(port, SCxSR, sci_serial_in(port, SCxSR) & mask); @@ -742,13 +749,13 @@ static void sci_init_pins(struct uart_port *port, uns= igned int cflag) return; } =20 - if (port->type =3D=3D PORT_SCIFA || port->type =3D=3D PORT_SCIFB) { + if (s->type =3D=3D PORT_SCIFA || s->type =3D=3D PORT_SCIFB) { u16 data =3D sci_serial_in(port, SCPDR); u16 ctrl =3D sci_serial_in(port, SCPCR); =20 /* Enable RXD and TXD pin functions */ ctrl &=3D ~(SCPCR_RXDC | SCPCR_TXDC); - if (to_sci_port(port)->has_rtscts) { + if (s->has_rtscts) { /* RTS# is output, active low, unless autorts */ if (!(port->mctrl & TIOCM_RTS)) { ctrl |=3D SCPCR_RTSC; @@ -765,7 +772,7 @@ static void sci_init_pins(struct uart_port *port, unsig= ned int cflag) } sci_serial_out(port, SCPDR, data); sci_serial_out(port, SCPCR, ctrl); - } else if (sci_getreg(port, SCSPTR)->size && s->cfg->regtype !=3D SCIx_RZ= V2H_SCIF_REGTYPE) { + } else if (sci_getreg(port, SCSPTR)->size && s->regtype !=3D SCIx_RZV2H_S= CIF_REGTYPE) { u16 status =3D sci_serial_in(port, SCSPTR); =20 /* RTS# is always output; and active low, unless autorts */ @@ -852,7 +859,7 @@ static void sci_transmit_chars(struct uart_port *port) c =3D port->x_char; port->x_char =3D 0; } else if (stopped || !kfifo_get(&tport->xmit_fifo, &c)) { - if (port->type =3D=3D PORT_SCI && + if (s->type =3D=3D PORT_SCI && kfifo_is_empty(&tport->xmit_fifo)) { ctrl =3D sci_serial_in(port, SCSCR); ctrl &=3D ~SCSCR_TE; @@ -873,7 +880,7 @@ static void sci_transmit_chars(struct uart_port *port) if (kfifo_len(&tport->xmit_fifo) < WAKEUP_CHARS) uart_write_wakeup(port); if (kfifo_is_empty(&tport->xmit_fifo)) { - if (port->type =3D=3D PORT_SCI) { + if (s->type =3D=3D PORT_SCI) { ctrl =3D sci_serial_in(port, SCSCR); ctrl &=3D ~SCSCR_TIE; ctrl |=3D SCSCR_TEIE; @@ -904,7 +911,7 @@ static void sci_receive_chars(struct uart_port *port) if (count =3D=3D 0) break; =20 - if (port->type =3D=3D PORT_SCI) { + if (s->type =3D=3D PORT_SCI) { char c =3D sci_serial_in(port, SCxRDR); if (uart_handle_sysrq_char(port, c)) count =3D 0; @@ -914,8 +921,8 @@ static void sci_receive_chars(struct uart_port *port) for (i =3D 0; i < count; i++) { char c; =20 - if (port->type =3D=3D PORT_SCIF || - port->type =3D=3D PORT_HSCIF) { + if (s->type =3D=3D PORT_SCIF || + s->type =3D=3D PORT_HSCIF) { status =3D sci_serial_in(port, SCxSR); c =3D sci_serial_in(port, SCxRDR); } else { @@ -1052,6 +1059,7 @@ static int sci_handle_breaks(struct uart_port *port) =20 static int scif_set_rtrg(struct uart_port *port, int rx_trig) { + struct sci_port *s =3D to_sci_port(port); unsigned int bits; =20 if (rx_trig >=3D port->fifosize) @@ -1065,7 +1073,7 @@ static int scif_set_rtrg(struct uart_port *port, int = rx_trig) return rx_trig; } =20 - switch (port->type) { + switch (s->type) { case PORT_SCIF: if (rx_trig < 4) { bits =3D 0; @@ -1150,7 +1158,7 @@ static ssize_t rx_fifo_trigger_store(struct device *d= ev, return ret; =20 sci->rx_trigger =3D sci->ops->set_rtrg(port, r); - if (port->type =3D=3D PORT_SCIFA || port->type =3D=3D PORT_SCIFB) + if (sci->type =3D=3D PORT_SCIFA || sci->type =3D=3D PORT_SCIFB) sci->ops->set_rtrg(port, 1); =20 return count; @@ -1166,7 +1174,7 @@ static ssize_t rx_fifo_timeout_show(struct device *de= v, struct sci_port *sci =3D to_sci_port(port); int v; =20 - if (port->type =3D=3D PORT_HSCIF) + if (sci->type =3D=3D PORT_HSCIF) v =3D sci->hscif_tot >> HSSCR_TOT_SHIFT; else v =3D sci->rx_fifo_timeout; @@ -1188,7 +1196,7 @@ static ssize_t rx_fifo_timeout_store(struct device *d= ev, if (ret) return ret; =20 - if (port->type =3D=3D PORT_HSCIF) { + if (sci->type =3D=3D PORT_HSCIF) { if (r < 0 || r > 3) return -EINVAL; sci->hscif_tot =3D r << HSSCR_TOT_SHIFT; @@ -1229,11 +1237,11 @@ static void sci_dma_tx_complete(void *arg) schedule_work(&s->work_tx); } else { s->cookie_tx =3D -EINVAL; - if (port->type =3D=3D PORT_SCIFA || port->type =3D=3D PORT_SCIFB || - s->cfg->regtype =3D=3D SCIx_RZ_SCIFA_REGTYPE) { + if (s->type =3D=3D PORT_SCIFA || s->type =3D=3D PORT_SCIFB || + s->regtype =3D=3D SCIx_RZ_SCIFA_REGTYPE) { u16 ctrl =3D sci_serial_in(port, SCSCR); sci_serial_out(port, SCSCR, ctrl & ~SCSCR_TIE); - if (s->cfg->regtype =3D=3D SCIx_RZ_SCIFA_REGTYPE) { + if (s->regtype =3D=3D SCIx_RZ_SCIFA_REGTYPE) { /* Switch irq from DMA to SCIF */ dmaengine_pause(s->chan_tx_saved); enable_irq(s->irqs[SCIx_TXI_IRQ]); @@ -1315,10 +1323,10 @@ static void sci_dma_rx_reenable_irq(struct sci_port= *s) =20 /* Direct new serial port interrupts back to CPU */ scr =3D sci_serial_in(port, SCSCR); - if (port->type =3D=3D PORT_SCIFA || port->type =3D=3D PORT_SCIFB || - s->cfg->regtype =3D=3D SCIx_RZ_SCIFA_REGTYPE) { + if (s->type =3D=3D PORT_SCIFA || s->type =3D=3D PORT_SCIFB || + s->regtype =3D=3D SCIx_RZ_SCIFA_REGTYPE) { enable_irq(s->irqs[SCIx_RXI_IRQ]); - if (s->cfg->regtype =3D=3D SCIx_RZ_SCIFA_REGTYPE) + if (s->regtype =3D=3D SCIx_RZ_SCIFA_REGTYPE) s->ops->set_rtrg(port, s->rx_trigger); else scr &=3D ~SCSCR_RDRQE; @@ -1558,8 +1566,8 @@ static enum hrtimer_restart sci_dma_rx_timer_fn(struc= t hrtimer *t) tty_flip_buffer_push(&port->state->port); } =20 - if (port->type =3D=3D PORT_SCIFA || port->type =3D=3D PORT_SCIFB || - s->cfg->regtype =3D=3D SCIx_RZ_SCIFA_REGTYPE) + if (s->type =3D=3D PORT_SCIFA || s->type =3D=3D PORT_SCIFB || + s->regtype =3D=3D SCIx_RZ_SCIFA_REGTYPE) sci_dma_rx_submit(s, true); =20 sci_dma_rx_reenable_irq(s); @@ -1682,8 +1690,8 @@ static void sci_request_dma(struct uart_port *port) =20 s->chan_rx_saved =3D s->chan_rx =3D chan; =20 - if (port->type =3D=3D PORT_SCIFA || port->type =3D=3D PORT_SCIFB || - s->cfg->regtype =3D=3D SCIx_RZ_SCIFA_REGTYPE) + if (s->type =3D=3D PORT_SCIFA || s->type =3D=3D PORT_SCIFB || + s->regtype =3D=3D SCIx_RZ_SCIFA_REGTYPE) sci_dma_rx_submit(s, false); } } @@ -1753,10 +1761,10 @@ static irqreturn_t sci_rx_interrupt(int irq, void *= ptr) u16 ssr =3D sci_serial_in(port, SCxSR); =20 /* Disable future Rx interrupts */ - if (port->type =3D=3D PORT_SCIFA || port->type =3D=3D PORT_SCIFB || - s->cfg->regtype =3D=3D SCIx_RZ_SCIFA_REGTYPE) { + if (s->type =3D=3D PORT_SCIFA || s->type =3D=3D PORT_SCIFB || + s->regtype =3D=3D SCIx_RZ_SCIFA_REGTYPE) { disable_irq_nosync(s->irqs[SCIx_RXI_IRQ]); - if (s->cfg->regtype =3D=3D SCIx_RZ_SCIFA_REGTYPE) { + if (s->regtype =3D=3D SCIx_RZ_SCIFA_REGTYPE) { s->ops->set_rtrg(port, 1); scr |=3D SCSCR_RIE; } else { @@ -1820,7 +1828,7 @@ static irqreturn_t sci_tx_end_interrupt(int irq, void= *ptr) unsigned long flags; u32 ctrl; =20 - if (port->type !=3D PORT_SCI) + if (s->type !=3D PORT_SCI) return sci_tx_interrupt(irq, ptr); =20 uart_port_lock_irqsave(port, &flags); @@ -1867,7 +1875,7 @@ static irqreturn_t sci_er_interrupt(int irq, void *pt= r) } =20 /* Handle errors */ - if (port->type =3D=3D PORT_SCI) { + if (s->type =3D=3D PORT_SCI) { if (sci_handle_errors(port)) { /* discard character in rx buffer */ sci_serial_in(port, SCxSR); @@ -2091,7 +2099,9 @@ static unsigned int sci_tx_empty(struct uart_port *po= rt) =20 static void sci_set_rts(struct uart_port *port, bool state) { - if (port->type =3D=3D PORT_SCIFA || port->type =3D=3D PORT_SCIFB) { + struct sci_port *s =3D to_sci_port(port); + + if (s->type =3D=3D PORT_SCIFA || s->type =3D=3D PORT_SCIFB) { u16 data =3D sci_serial_in(port, SCPDR); =20 /* Active low */ @@ -2118,7 +2128,9 @@ static void sci_set_rts(struct uart_port *port, bool = state) =20 static bool sci_get_cts(struct uart_port *port) { - if (port->type =3D=3D PORT_SCIFA || port->type =3D=3D PORT_SCIFB) { + struct sci_port *s =3D to_sci_port(port); + + if (s->type =3D=3D PORT_SCIFA || s->type =3D=3D PORT_SCIFB) { /* Active low */ return !(sci_serial_in(port, SCPDR) & SCPDR_CTSD); } else if (sci_getreg(port, SCSPTR)->size) { @@ -2164,21 +2176,21 @@ static void sci_set_mctrl(struct uart_port *port, u= nsigned int mctrl) =20 if (!(mctrl & TIOCM_RTS)) { /* Disable Auto RTS */ - if (s->cfg->regtype !=3D SCIx_RZV2H_SCIF_REGTYPE) + if (s->regtype !=3D SCIx_RZV2H_SCIF_REGTYPE) sci_serial_out(port, SCFCR, sci_serial_in(port, SCFCR) & ~SCFCR_MCE); =20 /* Clear RTS */ sci_set_rts(port, 0); } else if (s->autorts) { - if (port->type =3D=3D PORT_SCIFA || port->type =3D=3D PORT_SCIFB) { + if (s->type =3D=3D PORT_SCIFA || s->type =3D=3D PORT_SCIFB) { /* Enable RTS# pin function */ sci_serial_out(port, SCPCR, sci_serial_in(port, SCPCR) & ~SCPCR_RTSC); } =20 /* Enable Auto RTS */ - if (s->cfg->regtype !=3D SCIx_RZV2H_SCIF_REGTYPE) + if (s->regtype !=3D SCIx_RZV2H_SCIF_REGTYPE) sci_serial_out(port, SCFCR, sci_serial_in(port, SCFCR) | SCFCR_MCE); } else { @@ -2315,7 +2327,7 @@ static int sci_sck_calc(struct sci_port *s, unsigned = int bps, int err, min_err =3D INT_MAX; unsigned int sr; =20 - if (s->port.type !=3D PORT_HSCIF) + if (s->type !=3D PORT_HSCIF) freq *=3D 2; =20 for_each_sr(sr, s) { @@ -2342,7 +2354,7 @@ static int sci_brg_calc(struct sci_port *s, unsigned = int bps, int err, min_err =3D INT_MAX; unsigned int sr, dl; =20 - if (s->port.type !=3D PORT_HSCIF) + if (s->type !=3D PORT_HSCIF) freq *=3D 2; =20 for_each_sr(sr, s) { @@ -2375,7 +2387,7 @@ static int sci_scbrr_calc(struct sci_port *s, unsigne= d int bps, unsigned int sr, br, prediv, scrate, c; int err, min_err =3D INT_MAX; =20 - if (s->port.type !=3D PORT_HSCIF) + if (s->type !=3D PORT_HSCIF) freq *=3D 2; =20 /* @@ -2460,8 +2472,8 @@ static void sci_reset(struct uart_port *port) s->ops->set_rtrg(port, 1); timer_setup(&s->rx_fifo_timer, rx_fifo_timer_fn, 0); } else { - if (port->type =3D=3D PORT_SCIFA || - port->type =3D=3D PORT_SCIFB) + if (s->type =3D=3D PORT_SCIFA || + s->type =3D=3D PORT_SCIFB) s->ops->set_rtrg(port, 1); else s->ops->set_rtrg(port, s->rx_trigger); @@ -2521,8 +2533,8 @@ static void sci_set_termios(struct uart_port *port, s= truct ktermios *termios, */ =20 /* Optional Undivided External Clock */ - if (s->clk_rates[SCI_SCK] && port->type !=3D PORT_SCIFA && - port->type !=3D PORT_SCIFB) { + if (s->clk_rates[SCI_SCK] && s->type !=3D PORT_SCIFA && + s->type !=3D PORT_SCIFB) { err =3D sci_sck_calc(s, baud, &srr1); if (abs(err) < abs(min_err)) { best_clk =3D SCI_SCK; @@ -2607,7 +2619,7 @@ static void sci_set_termios(struct uart_port *port, s= truct ktermios *termios, sci_serial_out(port, SEMR, 0); =20 if (best_clk >=3D 0) { - if (port->type =3D=3D PORT_SCIFA || port->type =3D=3D PORT_SCIFB) + if (s->type =3D=3D PORT_SCIFA || s->type =3D=3D PORT_SCIFB) switch (srr + 1) { case 5: smr_val |=3D SCSMR_SRC_5; break; case 7: smr_val |=3D SCSMR_SRC_7; break; @@ -2692,12 +2704,12 @@ static void sci_set_termios(struct uart_port *port,= struct ktermios *termios, * (transmit interrupt enable) or in the same instruction to * start the transmitting process. So skip setting TE here for SCI. */ - if (port->type !=3D PORT_SCI) + if (s->type !=3D PORT_SCI) scr_val |=3D SCSCR_TE; scr_val |=3D SCSCR_RE | (s->cfg->scscr & ~(SCSCR_CKE1 | SCSCR_CKE0)); sci_serial_out(port, SCSCR, scr_val | s->hscif_tot); if ((srr + 1 =3D=3D 5) && - (port->type =3D=3D PORT_SCIFA || port->type =3D=3D PORT_SCIFB)) { + (s->type =3D=3D PORT_SCIFA || s->type =3D=3D PORT_SCIFB)) { /* * In asynchronous mode, when the sampling rate is 1/5, first * received data may become invalid on some SCIFA and SCIFB. @@ -2741,7 +2753,9 @@ void sci_pm(struct uart_port *port, unsigned int stat= e, =20 static const char *sci_type(struct uart_port *port) { - switch (port->type) { + struct sci_port *s =3D to_sci_port(port); + + switch (s->type) { case PORT_IRDA: return "irda"; case PORT_SCI: @@ -2825,8 +2839,7 @@ void sci_config_port(struct uart_port *port, int flag= s) { if (flags & UART_CONFIG_TYPE) { struct sci_port *sport =3D to_sci_port(port); - - port->type =3D sport->cfg->type; + port->type =3D SCI_PUBLIC_PORT_ID(sport->type); sci_request_port(port); } } @@ -2964,7 +2977,7 @@ static int sci_init_clocks(struct sci_port *sci_port,= struct device *dev) struct clk *clk; unsigned int i; =20 - if (sci_port->cfg->type =3D=3D PORT_HSCIF) + if (sci_port->type =3D=3D PORT_HSCIF) clk_names[SCI_SCK] =3D "hsck"; =20 for (i =3D 0; i < SCI_NUM_CLKS; i++) { @@ -3050,6 +3063,9 @@ static int sci_init_single(struct platform_device *de= v, =20 sci_port->cfg =3D p; =20 + sci_port->type =3D p->type; + sci_port->regtype =3D p->regtype; + port->iotype =3D UPIO_MEM; port->line =3D index; port->has_sysrq =3D IS_ENABLED(CONFIG_SERIAL_SH_SCI_CONSOLE); @@ -3128,11 +3144,11 @@ static int sci_init_single(struct platform_device *= dev, return ret; } =20 - port->type =3D p->type; + port->type =3D SCI_PUBLIC_PORT_ID(p->type); port->flags =3D UPF_FIXED_PORT | UPF_BOOT_AUTOCONF | p->flags; port->fifosize =3D sci_port->params->fifosize; =20 - if (port->type =3D=3D PORT_SCI && !dev->dev.of_node) { + if (p->type =3D=3D PORT_SCI && !dev->dev.of_node) { if (sci_port->reg_size >=3D 0x20) port->regshift =3D 2; else @@ -3322,13 +3338,13 @@ static struct uart_driver sci_uart_driver =3D { =20 static void sci_remove(struct platform_device *dev) { - struct sci_port *port =3D platform_get_drvdata(dev); - unsigned int type =3D port->port.type; /* uart_remove_... clears it */ + struct sci_port *s =3D platform_get_drvdata(dev); + unsigned int type =3D s->type; /* uart_remove_... clears it */ =20 - sci_ports_in_use &=3D ~BIT(port->port.line); - uart_remove_one_port(&sci_uart_driver, &port->port); + sci_ports_in_use &=3D ~BIT(s->port.line); + uart_remove_one_port(&sci_uart_driver, &s->port); =20 - if (port->port.fifosize > 1) + if (s->port.fifosize > 1) device_remove_file(&dev->dev, &dev_attr_rx_fifo_trigger); if (type =3D=3D PORT_SCIFA || type =3D=3D PORT_SCIFB || type =3D=3D PORT_= HSCIF) device_remove_file(&dev->dev, &dev_attr_rx_fifo_timeout); @@ -3682,8 +3698,8 @@ static int sci_probe(struct platform_device *dev) if (ret) return ret; } - if (sp->port.type =3D=3D PORT_SCIFA || sp->port.type =3D=3D PORT_SCIFB || - sp->port.type =3D=3D PORT_HSCIF) { + if (sp->type =3D=3D PORT_SCIFA || sp->type =3D=3D PORT_SCIFB || + sp->type =3D=3D PORT_HSCIF) { ret =3D device_create_file(&dev->dev, &dev_attr_rx_fifo_timeout); if (ret) { if (sp->port.fifosize > 1) { @@ -3799,8 +3815,11 @@ int __init scix_early_console_setup(struct earlycon_= device *device, if (!device->port.membase) return -ENODEV; =20 - device->port.type =3D data->type; + device->port.type =3D SCI_PUBLIC_PORT_ID(data->type); + sci_ports[0].port =3D device->port; + sci_ports[0].type =3D data->type; + sci_ports[0].regtype =3D data->regtype; =20 port_cfg.type =3D data->type; port_cfg.regtype =3D data->regtype; --=20 2.49.0 From nobody Thu Oct 9 13:50:22 2025 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (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 7F7A32E9751; Tue, 17 Jun 2025 13:45:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750167919; cv=none; b=ZLATf/yMvirCXKFH7PR0BSDFDgk1zkRdlRwgt+DHEU+KOUMNbCXfl1cohel6oYQQ0Az6Gyf4CYeEUvcPv+iMU6qcC3TpMFNA5NAEolYHwTYsaX2Z/wfo4tIGEN/4l+vGEa6ZlFRFWJJ2N/PiJ09+4SWIDx4YMbMjTlUUNdqNDbE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750167919; c=relaxed/simple; bh=dWDrQUBoFDs7ufAa4ZsFe0F/S+igcw/IjvOGJiGBjWo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DCaG7V+5LPJkpxFCUEzbPRwTJqP4GS0YsAkyyXEZAGXhWQvMI+LZmXZ0tkQfgJL4QXbPNJfYFOw8rOfV4iGo6O3W+nrn30Qma4vQzTBrtTIxXdRIdlcFUyKADx8hqiqOX229/BaeiCBikyKU6LfYbUPfZDuTx2uHEQFc4H2JZYI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=npDLMfgu; arc=none smtp.client-ip=209.85.221.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="npDLMfgu" Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-3a57ae5cb17so1740885f8f.0; Tue, 17 Jun 2025 06:45:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750167914; x=1750772714; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hU4uV7v96Y16idTqeKwdieFmKPkBM7NN6CTGFxqNauo=; b=npDLMfguWWYhj3KQ4XKRBj3VnGsR4X5cR49thfiWWBatq878FoDi5CF1oTqeGBpdDN HW2Z+laGbLkoLWhMRJyo0PlmIx0RGye5ln563JJ7IM6RQwLOXvl3d4ap5ArV269uz7fA jvummf1f6MfWB92z74+8R68ApIwgw1DXbjTxUbWGiZHMJMl6xeIVsxgtVuQfXBnFl0g2 XX6xbfE1Owunr3osQ+7BtotmFnnDX96YhUExcQRSyUPz3YBgbMOdA0fP6pA7azHqHzyj 9GiSPY1PuzT/eLF/qnUaiNysF720R8y/dRADd2i0c3/J5jATemZ5KinLg1bJ+acwO6Ue 74Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750167914; x=1750772714; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hU4uV7v96Y16idTqeKwdieFmKPkBM7NN6CTGFxqNauo=; b=wRjGE3StzRjG1P3LahnrYatJ/5uTf66siRaR+be6bqKKOqkwrMH+Nk9VhdPL/m6F4Y 9HHLt+cYV3CS4UsknSz5m2BuJg8mlGgVVytu5QbmJTanfw+jkeAO64qPvPsBVJV4tVNW bbzhoy0SBzixkMaThD/nmjyoMiUK1PpOpiJP7OzA31vSX1ktDmg7aG76zrXJVvlGpQAc 4zCERSShgJfTGtX80GnwllFsVkyZ7IJ0SHXY5h4inzSkVuQzGlnVAknDJZIj9iRbL8aW 0v1Fmj9pRyPEtAskU2u+8J0x/u35DkWAB20Gd48vFy7P2d5UriIOvgGaRse9wjsCEsJX odxw== X-Forwarded-Encrypted: i=1; AJvYcCVZzAZ8+wGrtC0pDWJjcnMgz6clq+m9w9bH6kAecZJg6DYQDdkBGqX0rXxKSlqiRCJd1+jRjCgAKUaUygr8+bOoSMo=@vger.kernel.org, AJvYcCW34u6z0Ev+MwzyDqpNkxNZP5jvRnY5dm2JbFEZODNxm6LFAH+X3Ca7Lokid/ii8ffb6m1rA4LTbTpnpsVn@vger.kernel.org, AJvYcCWGcADnesnCCIvm+sro5Psnhovd2p3pXoefLSg/VZyP+7vTrDcf876xhhJN2CCnYhCYBY3gsZhlyaQ1@vger.kernel.org, AJvYcCWvZoKV4SGY5pwCyKdJoxteZUBgn5YuuOacMsOFcV2kXsB2aTK6cNT7H5WeHsD8naYIkd+yCRj92RFwhYIr@vger.kernel.org X-Gm-Message-State: AOJu0Yz2Q58PhqNLBZPd1FXi23/udGPZPvPB5nrVa0EieCjnrUZ7Ti0E cde6vhIkCcFx6oSXszwloF3gva3ZXknGQtceinnl71A5hVHtLe1QSVsffxII25CNFQo= X-Gm-Gg: ASbGncsreyFHyDq/nmk3IDyR/iCMfikdSbQ0qrIJfY1astx8SBaYNtDAIum2bDbnucx kbskWedScXOrwst+488WVWyf8vIQD7NQTeXhvbQfeDbF9inS9ylZQUpzlun+riGVlAmOZSXz0Ss RPpzzfZ0oNLU+6BDtwqlKueXpMd4ugBRfvbot9nIx/uGNI6dR9tyNRhZzkEw6kKjzaoBVwxC1ds 1ziSqI6qRKN+OEb3ZFFyyeKoEn8d1MElNPFae+UPrtyBbnoZqT8pITeUVvfkKdp+4RlUalyGJBn Ng2aXFYcyuDQyBK2idi441tWS3Xtu1l70OjS0ZdwTH2UmR1xdiOzWgiGP59ljBSjUNhnjreh1v+ E3YrTXHXEb6s= X-Google-Smtp-Source: AGHT+IE+6JKOaUMCwKtF2+GfPE61r53jbzZBp8LiS+ir9xi7nQlCA4fP2v6rQY7yZ+gR1OJATVySTQ== X-Received: by 2002:a05:6000:653:b0:3a5:8934:493a with SMTP id ffacd0b85a97d-3a589344d82mr1979336f8f.44.1750167913542; Tue, 17 Jun 2025 06:45:13 -0700 (PDT) Received: from iku.Home ([2a06:5906:61b:2d00:a081:30f1:e1c7:6f28]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a568a54b7asm14239728f8f.16.2025.06.17.06.45.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 06:45:12 -0700 (PDT) From: Prabhakar X-Google-Original-From: Prabhakar To: Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Catalin Marinas , Will Deacon , Magnus Damm , Wolfram Sang Cc: linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, Prabhakar , Biju Das , Fabrizio Castro , Lad Prabhakar Subject: [PATCH v12 6/7] serial: sh-sci: Add support for RZ/T2H SCI Date: Tue, 17 Jun 2025 14:45:03 +0100 Message-ID: <20250617134504.126313-7-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250617134504.126313-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20250617134504.126313-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Thierry Bultel Define a new RSCI port type, and the RSCI 32 bits registers set. The RZ/T2H SCI has a a fifo, and a quite different set of registers from the original SH SCI ones. DMA is not supported yet. Signed-off-by: Thierry Bultel Signed-off-by: Lad Prabhakar Reviewed-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven --- drivers/tty/serial/Kconfig | 7 + drivers/tty/serial/Makefile | 1 + drivers/tty/serial/rsci.c | 477 +++++++++++++++++++++++++++++ drivers/tty/serial/rsci.h | 10 + drivers/tty/serial/sh-sci-common.h | 5 + drivers/tty/serial/sh-sci.c | 53 +++- 6 files changed, 543 insertions(+), 10 deletions(-) create mode 100644 drivers/tty/serial/rsci.c create mode 100644 drivers/tty/serial/rsci.h diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig index 79a8186d3361..44427415a80d 100644 --- a/drivers/tty/serial/Kconfig +++ b/drivers/tty/serial/Kconfig @@ -675,6 +675,13 @@ config SERIAL_SH_SCI_DMA depends on SERIAL_SH_SCI && DMA_ENGINE default ARCH_RENESAS =20 +config SERIAL_RSCI + tristate "Support for Renesas RZ/T2H SCI variant" + depends on SERIAL_SH_SCI + help + Support for the RZ/T2H SCI variant with fifo. + Say Y if you want to be able to use the RZ/T2H SCI serial port. + config SERIAL_HS_LPC32XX tristate "LPC32XX high speed serial port support" depends on ARCH_LPC32XX || COMPILE_TEST diff --git a/drivers/tty/serial/Makefile b/drivers/tty/serial/Makefile index d58d9f719889..a2ccbc508ec5 100644 --- a/drivers/tty/serial/Makefile +++ b/drivers/tty/serial/Makefile @@ -71,6 +71,7 @@ obj-$(CONFIG_SERIAL_QCOM_GENI) +=3D qcom_geni_serial.o obj-$(CONFIG_SERIAL_QE) +=3D ucc_uart.o obj-$(CONFIG_SERIAL_RDA) +=3D rda-uart.o obj-$(CONFIG_SERIAL_RP2) +=3D rp2.o +obj-$(CONFIG_SERIAL_RSCI) +=3D rsci.o obj-$(CONFIG_SERIAL_SA1100) +=3D sa1100.o obj-$(CONFIG_SERIAL_SAMSUNG) +=3D samsung_tty.o obj-$(CONFIG_SERIAL_SB1250_DUART) +=3D sb1250-duart.o diff --git a/drivers/tty/serial/rsci.c b/drivers/tty/serial/rsci.c new file mode 100644 index 000000000000..8274dbbd7cc2 --- /dev/null +++ b/drivers/tty/serial/rsci.c @@ -0,0 +1,477 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2025 Renesas Electronics Corp. + */ + +#include +#include +#include +#include +#include +#include +#include +#include "rsci.h" + +/* RSCI registers */ +#define RDR 0x00 +#define TDR 0x04 +#define CCR0 0x08 +#define CCR1 0x0C +#define CCR2 0x10 +#define CCR3 0x14 +#define CCR4 0x18 +#define FCR 0x24 +#define DCR 0x30 +#define CSR 0x48 +#define FRSR 0x50 +#define FTSR 0x54 +#define CFCLR 0x68 +#define FFCLR 0x70 + +/* RDR (Receive Data Register) */ +#define RDR_FFER BIT(12) /* FIFO Framing Error */ +#define RDR_FPER BIT(11) /* FIFO Parity Error */ +#define RDR_RDAT_MSK GENMASK(8, 0) + +/* TDR (Transmit Data Register) */ +#define TDR_MPBT BIT(9) /* Multiprocessor Transfer */ +#define TDR_TDAT_9BIT_LSHIFT 0 +#define TDR_TDAT_9BIT_VAL 0x1FF +#define TDR_TDAT_9BIT_MSK (TDR_TDAT_9BIT_VAL << TDR_TDAT_9BIT_LSHIFT) + +/* CCR0 (Common Control Register 0) */ +#define CCR0_SSE BIT(24) /* SSn# Pin Function Enable */ +#define CCR0_TEIE BIT(21) /* Transmit End Interrupt Enable */ +#define CCR0_TIE BIT(20) /* Transmit Interrupt Enable */ +#define CCR0_RIE BIT(16) /* Receive Interrupt Enable */ +#define CCR0_IDSEL BIT(10) /* ID Frame Select */ +#define CCR0_DCME BIT(9) /* Data Compare Match Enable */ +#define CCR0_MPIE BIT(8) /* Multiprocessor Interrupt Enable */ +#define CCR0_TE BIT(4) /* Transmit Enable */ +#define CCR0_RE BIT(0) /* Receive Enable */ + +/* CCR1 (Common Control Register 1) */ +#define CCR1_NFEN BIT(28) /* Digital Noise Filter Function */ +#define CCR1_SHARPS BIT(20) /* Half -duplex Communication Select */ +#define CCR1_SPLP BIT(16) /* Loopback Control */ +#define CCR1_RINV BIT(13) /* RxD invert */ +#define CCR1_TINV BIT(12) /* TxD invert */ +#define CCR1_PM BIT(9) /* Parity Mode */ +#define CCR1_PE BIT(8) /* Parity Enable */ +#define CCR1_SPB2IO BIT(5) /* Serial Port Break I/O */ +#define CCR1_SPB2DT BIT(4) /* Serial Port Break Data Select */ +#define CCR1_CTSPEN BIT(1) /* CTS External Pin Enable */ +#define CCR1_CTSE BIT(0) /* CTS Enable */ + +/* FCR (FIFO Control Register) */ +#define FCR_RFRST BIT(23) /* Receive FIFO Data Register Reset */ +#define FCR_TFRST BIT(15) /* Transmit FIFO Data Register Reset */ +#define FCR_DRES BIT(0) /* Incoming Data Ready Error Select */ +#define FCR_RTRG4_0 GENMASK(20, 16) +#define FCR_TTRG GENMASK(12, 8) + +/* CSR (Common Status Register) */ +#define CSR_RDRF BIT(31) /* Receive Data Full */ +#define CSR_TEND BIT(30) /* Transmit End Flag */ +#define CSR_TDRE BIT(29) /* Transmit Data Empty */ +#define CSR_FER BIT(28) /* Framing Error */ +#define CSR_PER BIT(27) /* Parity Error */ +#define CSR_MFF BIT(26) /* Mode Fault Error */ +#define CSR_ORER BIT(24) /* Overrun Error */ +#define CSR_DFER BIT(18) /* Data Compare Match Framing Error */ +#define CSR_DPER BIT(17) /* Data Compare Match Parity Error */ +#define CSR_DCMF BIT(16) /* Data Compare Match */ +#define CSR_RXDMON BIT(15) /* Serial Input Data Monitor */ +#define CSR_ERS BIT(4) /* Error Signal Status */ + +#define SCxSR_ERRORS(port) (to_sci_port(port)->params->error_mask) +#define SCxSR_ERROR_CLEAR(port) (to_sci_port(port)->params->error_clear) + +#define RSCI_DEFAULT_ERROR_MASK (CSR_PER | CSR_FER) + +#define RSCI_RDxF_CLEAR (CFCLR_RDRFC) +#define RSCI_ERROR_CLEAR (CFCLR_PERC | CFCLR_FERC) +#define RSCI_TDxE_CLEAR (CFCLR_TDREC) +#define RSCI_BREAK_CLEAR (CFCLR_PERC | CFCLR_FERC | CFCLR_ORERC) + +/* FRSR (FIFO Receive Status Register) */ +#define FRSR_R5_0 GENMASK(13, 8) /* Receive FIFO Data Count */ +#define FRSR_DR BIT(0) /* Receive Data Ready */ + +/* CFCLR (Common Flag CLear Register) */ +#define CFCLR_RDRFC BIT(31) /* RDRF Clear */ +#define CFCLR_TDREC BIT(29) /* TDRE Clear */ +#define CFCLR_FERC BIT(28) /* FER Clear */ +#define CFCLR_PERC BIT(27) /* PER Clear */ +#define CFCLR_MFFC BIT(26) /* MFF Clear */ +#define CFCLR_ORERC BIT(24) /* ORER Clear */ +#define CFCLR_DFERC BIT(18) /* DFER Clear */ +#define CFCLR_DPERC BIT(17) /* DPER Clear */ +#define CFCLR_DCMFC BIT(16) /* DCMF Clear */ +#define CFCLR_ERSC BIT(4) /* ERS Clear */ +#define CFCLR_CLRFLAG (CFCLR_RDRFC | CFCLR_FERC | CFCLR_PERC | \ + CFCLR_MFFC | CFCLR_ORERC | CFCLR_DFERC | \ + CFCLR_DPERC | CFCLR_DCMFC | CFCLR_ERSC) + +/* FFCLR (FIFO Flag CLear Register) */ +#define FFCLR_DRC BIT(0) /* DR Clear */ + +#define DCR_DEPOL BIT(0) + +static u32 rsci_serial_in(struct uart_port *p, int offset) +{ + return readl(p->membase + offset); +} + +static void rsci_serial_out(struct uart_port *p, int offset, int value) +{ + writel(value, p->membase + offset); +} + +static void rsci_clear_DRxC(struct uart_port *port) +{ + rsci_serial_out(port, CFCLR, CFCLR_RDRFC); + rsci_serial_out(port, FFCLR, FFCLR_DRC); +} + +static void rsci_clear_SCxSR(struct uart_port *port, unsigned int mask) +{ + rsci_serial_out(port, CFCLR, mask); +} + +static void rsci_start_rx(struct uart_port *port) +{ + unsigned int ctrl; + + ctrl =3D rsci_serial_in(port, CCR0); + ctrl |=3D CCR0_RIE; + rsci_serial_out(port, CCR0, ctrl); +} + +static void rsci_set_termios(struct uart_port *port, struct ktermios *term= ios, + const struct ktermios *old) +{ + struct sci_port *s =3D to_sci_port(port); + unsigned long flags; + + sci_port_enable(s); + uart_port_lock_irqsave(port, &flags); + + /* For now, only RX enabling is supported */ + if (termios->c_cflag & CREAD) + rsci_start_rx(port); + + uart_port_unlock_irqrestore(port, flags); + sci_port_disable(s); +} + +static int rsci_txfill(struct uart_port *port) +{ + return rsci_serial_in(port, FTSR); +} + +static int rsci_rxfill(struct uart_port *port) +{ + u32 val =3D rsci_serial_in(port, FRSR); + + return FIELD_GET(FRSR_R5_0, val); +} + +static unsigned int rsci_tx_empty(struct uart_port *port) +{ + unsigned int status =3D rsci_serial_in(port, CSR); + unsigned int in_tx_fifo =3D rsci_txfill(port); + + return (status & CSR_TEND) && !in_tx_fifo ? TIOCSER_TEMT : 0; +} + +static void rsci_set_mctrl(struct uart_port *port, unsigned int mctrl) +{ + /* Not supported yet */ +} + +static unsigned int rsci_get_mctrl(struct uart_port *port) +{ + /* Not supported yet */ + return 0; +} + +static void rsci_clear_CFC(struct uart_port *port, unsigned int mask) +{ + rsci_serial_out(port, CFCLR, mask); +} + +static void rsci_start_tx(struct uart_port *port) +{ + struct sci_port *sp =3D to_sci_port(port); + u32 ctrl; + + if (sp->chan_tx) + return; + + /* + * TE (Transmit Enable) must be set after setting TIE + * (Transmit Interrupt Enable) or in the same instruction + * to start the transmit process. + */ + ctrl =3D rsci_serial_in(port, CCR0); + ctrl |=3D CCR0_TIE | CCR0_TE; + rsci_serial_out(port, CCR0, ctrl); +} + +static void rsci_stop_tx(struct uart_port *port) +{ + u32 ctrl; + + ctrl =3D rsci_serial_in(port, CCR0); + ctrl &=3D ~CCR0_TIE; + rsci_serial_out(port, CCR0, ctrl); +} + +static void rsci_stop_rx(struct uart_port *port) +{ + u32 ctrl; + + ctrl =3D rsci_serial_in(port, CCR0); + ctrl &=3D ~CCR0_RIE; + rsci_serial_out(port, CCR0, ctrl); +} + +static int rsci_txroom(struct uart_port *port) +{ + return port->fifosize - rsci_txfill(port); +} + +static void rsci_transmit_chars(struct uart_port *port) +{ + unsigned int stopped =3D uart_tx_stopped(port); + struct tty_port *tport =3D &port->state->port; + u32 status, ctrl; + int count; + + status =3D rsci_serial_in(port, CSR); + if (!(status & CSR_TDRE)) { + ctrl =3D rsci_serial_in(port, CCR0); + if (kfifo_is_empty(&tport->xmit_fifo)) + ctrl &=3D ~CCR0_TIE; + else + ctrl |=3D CCR0_TIE; + rsci_serial_out(port, CCR0, ctrl); + return; + } + + count =3D rsci_txroom(port); + + do { + unsigned char c; + + if (port->x_char) { + c =3D port->x_char; + port->x_char =3D 0; + } else if (stopped || !kfifo_get(&tport->xmit_fifo, &c)) { + break; + } + + rsci_clear_CFC(port, CFCLR_TDREC); + rsci_serial_out(port, TDR, c); + + port->icount.tx++; + } while (--count > 0); + + if (kfifo_len(&tport->xmit_fifo) < WAKEUP_CHARS) + uart_write_wakeup(port); + + if (kfifo_is_empty(&tport->xmit_fifo)) { + ctrl =3D rsci_serial_in(port, CCR0); + ctrl &=3D ~CCR0_TIE; + ctrl |=3D CCR0_TEIE; + rsci_serial_out(port, CCR0, ctrl); + } +} + +static void rsci_receive_chars(struct uart_port *port) +{ + struct tty_port *tport =3D &port->state->port; + u32 rdat, status, frsr_status =3D 0; + int i, count, copied =3D 0; + unsigned char flag; + + status =3D rsci_serial_in(port, CSR); + frsr_status =3D rsci_serial_in(port, FRSR); + + if (!(status & CSR_RDRF) && !(frsr_status & FRSR_DR)) + return; + + while (1) { + /* Don't copy more bytes than there is room for in the buffer */ + count =3D tty_buffer_request_room(tport, rsci_rxfill(port)); + + /* If for any reason we can't copy more data, we're done! */ + if (count =3D=3D 0) + break; + + for (i =3D 0; i < count; i++) { + char c; + + rdat =3D rsci_serial_in(port, RDR); + /* 9-bits data is not supported yet */ + c =3D rdat & RDR_RDAT_MSK; + + if (uart_handle_sysrq_char(port, c)) { + count--; + i--; + continue; + } + + /* Store data and status. + * Non FIFO mode is not supported + */ + if (rdat & RDR_FFER) { + flag =3D TTY_FRAME; + port->icount.frame++; + } else if (rdat & RDR_FPER) { + flag =3D TTY_PARITY; + port->icount.parity++; + } else { + flag =3D TTY_NORMAL; + } + + tty_insert_flip_char(tport, c, flag); + } + + rsci_serial_in(port, CSR); /* dummy read */ + rsci_clear_DRxC(port); + + copied +=3D count; + port->icount.rx +=3D count; + } + + if (copied) { + /* Tell the rest of the system the news. New characters! */ + tty_flip_buffer_push(tport); + } else { + /* TTY buffers full; read from RX reg to prevent lockup */ + rsci_serial_in(port, RDR); + rsci_serial_in(port, CSR); /* dummy read */ + rsci_clear_DRxC(port); + } +} + +static void rsci_poll_put_char(struct uart_port *port, unsigned char c) +{ + u32 status; + int ret; + + ret =3D readl_relaxed_poll_timeout_atomic(port->membase + CSR, status, + (status & CSR_TDRE), 100, + USEC_PER_SEC); + if (ret !=3D 0) { + dev_err(port->dev, + "Error while sending data in UART TX : %d\n", ret); + goto done; + } + rsci_serial_out(port, TDR, c); +done: + rsci_clear_SCxSR(port, CFCLR_TDREC); +} + +static void rsci_prepare_console_write(struct uart_port *port, u32 ctrl) +{ + struct sci_port *s =3D to_sci_port(port); + u32 ctrl_temp =3D + s->params->param_bits->rxtx_enable | CCR0_TIE | + s->hscif_tot; + rsci_serial_out(port, CCR0, ctrl_temp); +} + +static const char *rsci_type(struct uart_port *port) +{ + return "rsci"; +} + +static size_t rsci_suspend_regs_size(void) +{ + return 0; +} + +static void rsci_shutdown_complete(struct uart_port *port) +{ + /* + * Stop RX and TX, disable related interrupts, keep clock source + */ + rsci_serial_out(port, CCR0, 0); +} + +static const struct sci_common_regs rsci_common_regs =3D { + .status =3D CSR, + .control =3D CCR0, +}; + +static const struct sci_port_params_bits rsci_port_param_bits =3D { + .rxtx_enable =3D CCR0_RE | CCR0_TE, + .te_clear =3D CCR0_TE | CCR0_TEIE, + .poll_sent_bits =3D CSR_TDRE | CSR_TEND, +}; + +static const struct sci_port_params rsci_port_params =3D { + .fifosize =3D 16, + .overrun_reg =3D CSR, + .overrun_mask =3D CSR_ORER, + .sampling_rate_mask =3D SCI_SR(32), + .error_mask =3D RSCI_DEFAULT_ERROR_MASK, + .error_clear =3D RSCI_ERROR_CLEAR, + .param_bits =3D &rsci_port_param_bits, + .common_regs =3D &rsci_common_regs, +}; + +static const struct uart_ops rsci_uart_ops =3D { + .tx_empty =3D rsci_tx_empty, + .set_mctrl =3D rsci_set_mctrl, + .get_mctrl =3D rsci_get_mctrl, + .start_tx =3D rsci_start_tx, + .stop_tx =3D rsci_stop_tx, + .stop_rx =3D rsci_stop_rx, + .startup =3D sci_startup, + .shutdown =3D sci_shutdown, + .set_termios =3D rsci_set_termios, + .pm =3D sci_pm, + .type =3D rsci_type, + .release_port =3D sci_release_port, + .request_port =3D sci_request_port, + .config_port =3D sci_config_port, + .verify_port =3D sci_verify_port, +}; + +static const struct sci_port_ops rsci_port_ops =3D { + .read_reg =3D rsci_serial_in, + .write_reg =3D rsci_serial_out, + .clear_SCxSR =3D rsci_clear_SCxSR, + .transmit_chars =3D rsci_transmit_chars, + .receive_chars =3D rsci_receive_chars, + .poll_put_char =3D rsci_poll_put_char, + .prepare_console_write =3D rsci_prepare_console_write, + .suspend_regs_size =3D rsci_suspend_regs_size, + .shutdown_complete =3D rsci_shutdown_complete, +}; + +struct sci_of_data of_sci_rsci_data =3D { + .type =3D SCI_PORT_RSCI, + .ops =3D &rsci_port_ops, + .uart_ops =3D &rsci_uart_ops, + .params =3D &rsci_port_params, +}; + +#ifdef CONFIG_SERIAL_SH_SCI_EARLYCON + +static int __init rsci_early_console_setup(struct earlycon_device *device, + const char *opt) +{ + return scix_early_console_setup(device, &of_sci_rsci_data); +} + +OF_EARLYCON_DECLARE(rsci, "renesas,r9a09g077-rsci", rsci_early_console_set= up); + +#endif /* CONFIG_SERIAL_SH_SCI_EARLYCON */ + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("RSCI serial driver"); diff --git a/drivers/tty/serial/rsci.h b/drivers/tty/serial/rsci.h new file mode 100644 index 000000000000..2af3f28b465a --- /dev/null +++ b/drivers/tty/serial/rsci.h @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef __RSCI_H__ +#define __RSCI_H__ + +#include "sh-sci-common.h" + +extern struct sci_of_data of_sci_rsci_data; + +#endif /* __RSCI_H__ */ diff --git a/drivers/tty/serial/sh-sci-common.h b/drivers/tty/serial/sh-sci= -common.h index fcddf66780c9..e3c028df14f1 100644 --- a/drivers/tty/serial/sh-sci-common.h +++ b/drivers/tty/serial/sh-sci-common.h @@ -5,6 +5,11 @@ =20 #include =20 +/* Private port IDs */ +enum SCI_PORT_TYPE { + SCI_PORT_RSCI =3D BIT(7) | 0, +}; + enum SCI_CLKS { SCI_FCK, /* Functional Clock */ SCI_SCK, /* Optional External Clock */ diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index aca2b89802bc..daa01cab6c31 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -54,6 +54,7 @@ #include #endif =20 +#include "rsci.h" #include "serial_mctrl_gpio.h" #include "sh-sci.h" #include "sh-sci-common.h" @@ -550,6 +551,7 @@ void sci_port_enable(struct sci_port *sci_port) } sci_port->port.uartclk =3D sci_port->clk_rates[SCI_FCK]; } +EXPORT_SYMBOL(sci_port_enable); =20 void sci_port_disable(struct sci_port *sci_port) { @@ -563,6 +565,7 @@ void sci_port_disable(struct sci_port *sci_port) =20 pm_runtime_put_sync(sci_port->port.dev); } +EXPORT_SYMBOL(sci_port_disable); =20 static inline unsigned long port_rx_irq_mask(struct uart_port *port) { @@ -1828,7 +1831,7 @@ static irqreturn_t sci_tx_end_interrupt(int irq, void= *ptr) unsigned long flags; u32 ctrl; =20 - if (s->type !=3D PORT_SCI) + if (s->type !=3D PORT_SCI && s->type !=3D SCI_PORT_RSCI) return sci_tx_interrupt(irq, ptr); =20 uart_port_lock_irqsave(port, &flags); @@ -2289,6 +2292,7 @@ int sci_startup(struct uart_port *port) =20 return 0; } +EXPORT_SYMBOL(sci_startup); =20 void sci_shutdown(struct uart_port *port) { @@ -2319,6 +2323,7 @@ void sci_shutdown(struct uart_port *port) sci_free_irq(s); sci_free_dma(port); } +EXPORT_SYMBOL(sci_shutdown); =20 static int sci_sck_calc(struct sci_port *s, unsigned int bps, unsigned int *srr) @@ -2750,6 +2755,7 @@ void sci_pm(struct uart_port *port, unsigned int stat= e, break; } } +EXPORT_SYMBOL(sci_pm); =20 static const char *sci_type(struct uart_port *port) { @@ -2812,6 +2818,7 @@ void sci_release_port(struct uart_port *port) =20 release_mem_region(port->mapbase, sport->reg_size); } +EXPORT_SYMBOL(sci_release_port); =20 int sci_request_port(struct uart_port *port) { @@ -2834,6 +2841,7 @@ int sci_request_port(struct uart_port *port) =20 return 0; } +EXPORT_SYMBOL(sci_request_port); =20 void sci_config_port(struct uart_port *port, int flags) { @@ -2843,6 +2851,7 @@ void sci_config_port(struct uart_port *port, int flag= s) sci_request_port(port); } } +EXPORT_SYMBOL(sci_config_port); =20 int sci_verify_port(struct uart_port *port, struct serial_struct *ser) { @@ -2852,6 +2861,7 @@ int sci_verify_port(struct uart_port *port, struct se= rial_struct *ser) =20 return 0; } +EXPORT_SYMBOL(sci_verify_port); =20 static void sci_prepare_console_write(struct uart_port *port, u32 ctrl) { @@ -2977,14 +2987,27 @@ static int sci_init_clocks(struct sci_port *sci_por= t, struct device *dev) struct clk *clk; unsigned int i; =20 - if (sci_port->type =3D=3D PORT_HSCIF) + if (sci_port->type =3D=3D PORT_HSCIF) { clk_names[SCI_SCK] =3D "hsck"; + } else if (sci_port->type =3D=3D SCI_PORT_RSCI) { + clk_names[SCI_FCK] =3D "operation"; + clk_names[SCI_BRG_INT] =3D "bus"; + } =20 for (i =3D 0; i < SCI_NUM_CLKS; i++) { - clk =3D devm_clk_get_optional(dev, clk_names[i]); + const char *name =3D clk_names[i]; + + clk =3D devm_clk_get_optional(dev, name); if (IS_ERR(clk)) return PTR_ERR(clk); =20 + if (!clk && sci_port->type =3D=3D SCI_PORT_RSCI && + (i =3D=3D SCI_FCK || i =3D=3D SCI_BRG_INT)) { + return dev_err_probe(dev, -ENODEV, + "failed to get %s\n", + name); + } + if (!clk && i =3D=3D SCI_FCK) { /* * Not all SH platforms declare a clock lookup entry @@ -2995,13 +3018,13 @@ static int sci_init_clocks(struct sci_port *sci_por= t, struct device *dev) if (IS_ERR(clk)) return dev_err_probe(dev, PTR_ERR(clk), "failed to get %s\n", - clk_names[i]); + name); } =20 if (!clk) - dev_dbg(dev, "failed to get %s\n", clk_names[i]); + dev_dbg(dev, "failed to get %s\n", name); else - dev_dbg(dev, "clk %s is %pC rate %lu\n", clk_names[i], + dev_dbg(dev, "clk %s is %pC rate %lu\n", name, clk, clk_get_rate(clk)); sci_port->clks[i] =3D clk; } @@ -3085,10 +3108,10 @@ static int sci_init_single(struct platform_device *= dev, } =20 /* - * The fourth interrupt on SCI port is transmit end interrupt, so + * The fourth interrupt on SCI and RSCI port is transmit end interrupt, so * shuffle the interrupts. */ - if (p->type =3D=3D PORT_SCI) + if (p->type =3D=3D PORT_SCI || p->type =3D=3D SCI_PORT_RSCI) swap(sci_port->irqs[SCIx_BRI_IRQ], sci_port->irqs[SCIx_TEI_IRQ]); =20 /* The SCI generates several interrupts. They can be muxed together or @@ -3122,6 +3145,9 @@ static int sci_init_single(struct platform_device *de= v, else sci_port->rx_trigger =3D 8; break; + case SCI_PORT_RSCI: + sci_port->rx_trigger =3D 15; + break; default: sci_port->rx_trigger =3D 1; break; @@ -3346,7 +3372,8 @@ static void sci_remove(struct platform_device *dev) =20 if (s->port.fifosize > 1) device_remove_file(&dev->dev, &dev_attr_rx_fifo_trigger); - if (type =3D=3D PORT_SCIFA || type =3D=3D PORT_SCIFB || type =3D=3D PORT_= HSCIF) + if (type =3D=3D PORT_SCIFA || type =3D=3D PORT_SCIFB || type =3D=3D PORT_= HSCIF || + type =3D=3D SCI_PORT_RSCI) device_remove_file(&dev->dev, &dev_attr_rx_fifo_timeout); } =20 @@ -3440,6 +3467,12 @@ static const struct of_device_id of_sci_match[] __ma= ybe_unused =3D { .compatible =3D "renesas,scif-r9a09g057", .data =3D &of_sci_scif_rzv2h, }, +#ifdef CONFIG_SERIAL_RSCI + { + .compatible =3D "renesas,r9a09g077-rsci", + .data =3D &of_sci_rsci_data, + }, +#endif /* CONFIG_SERIAL_RSCI */ /* Family-specific types */ { .compatible =3D "renesas,rcar-gen1-scif", @@ -3699,7 +3732,7 @@ static int sci_probe(struct platform_device *dev) return ret; } if (sp->type =3D=3D PORT_SCIFA || sp->type =3D=3D PORT_SCIFB || - sp->type =3D=3D PORT_HSCIF) { + sp->type =3D=3D PORT_HSCIF || sp->type =3D=3D SCI_PORT_RSCI) { ret =3D device_create_file(&dev->dev, &dev_attr_rx_fifo_timeout); if (ret) { if (sp->port.fifosize > 1) { --=20 2.49.0 From nobody Thu Oct 9 13:50:22 2025 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (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 CD6532E975D; Tue, 17 Jun 2025 13:45:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750167918; cv=none; b=E3g5JjKUoVQhAy5cVte5cBIDg0AZArRrH95XpOHaGkTP2IwADq/CxWylqE4dVcSlD+2tl9+uwF8f2XFKCWQ6Fwa0WGGXf/80ld/hzCk4uEuOeFiv1KEHAgIdPxgcVpNBbFMNX6xi8fRs0eno66/C3noShFosbs0NKASue9ZtC14= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750167918; c=relaxed/simple; bh=BzxjO2z1leHYDjty4qWmrq5BBlFSqcT0qYJbbm0j/og=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jodBwChpKerVHrrwShxUXzZOMoBwtMorvHIfxbNrwnlx3QRv5c0DQL7DDPij5T+oBODe2fztloZyQE2RwBRUdv407J5xRULJYCfCnCOXN+0iHx6f0Y1dZq8mTSoZyNSWXijmzdgbB8+NRSKhqs4NsaT5VEvGQlk5BdoO7xpQSHY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=N2nK/EcW; arc=none smtp.client-ip=209.85.128.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="N2nK/EcW" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-451d7b50815so48657655e9.2; Tue, 17 Jun 2025 06:45:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750167915; x=1750772715; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CV8mc/E0A+rPFjLDN5GDkaclgYEmX3SItNdHdGCGzKo=; b=N2nK/EcWsdaGWB+mSGXsZT84fhaVHiWVhRGhB8o0HieDNTcM+w7Z/KHGs5erxbb8Db c0FVpDYRNtYbahNYW8TqzR/I4sdOwG1TJUrZGGAfTRE6oREm8jYfzWogZ7MNmaXEwlq+ oNlLFMXKw5YZ/2+Ne7yyRwo4qfScKM9PAr/DlC8B8ynHFgtc6S5jErT00I9YszRB+Ikm j3HrGLLMUQax7At51kyyxLMhGl4QukEOIZoC3ey7kZ+4cV4wtv81khM+aKowpbZEuup+ tJhLr/Wrqu1PGZTpWpju4q0osb8PvPM1ZcNjWgG8asC4VUXnnMabV7KJnOKRAHFZ0ABJ jkYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750167915; x=1750772715; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CV8mc/E0A+rPFjLDN5GDkaclgYEmX3SItNdHdGCGzKo=; b=gp8k27n44+Ft+bHbJM1M0nCvlmGyTlfMFOHmpX4zdjx7hbdJX//VLbXv4m+S7L0V/s w7EPbR92Ka/zT5RvwWs2OAkE35gZbTa+kARpgjKzZeXLw2q57t6L+VXKi6aObI3m8Sey Em7q7kCPbhzr1bKTgrIk5qF0aeZ5y3oqdRpRBWgo2ItuyZL/77Wfr/Qll4WiML4t0ZbP GNkAipwkpvBli7Q646hPiiw4UX4pa0tJoMvACnc9XHLFzfnuVW3bsmZwRfQj3qHWNQI0 l68XxBWXz8DR1pSbOHUcQNxUSMRYIA74EWlY6jnUBpAsUPsKjuk+aomL+NKfrkHoLX0D E4OA== X-Forwarded-Encrypted: i=1; AJvYcCUBh0QLXaWTDU8fYGhQpwXACTmq0vS5gjk7KbQP1Py+0cKJKr0mFNz0ihzDTuzmwzIqxDfh40QI3/HzNcT1@vger.kernel.org, AJvYcCV+jhmNzmvVf5p7rFrM5UZcznEpiN76j2T3cST4VjCsR9eLWBSLnsD3p8j605egtW75VmdHRiNnB7JC@vger.kernel.org, AJvYcCVPY0Yt/F0Qj5XTKTdpUKHVmPnyt/WAK8RfDd0rkJVn5nkyIfw9HbsqkZtre/I5EZD5aEnTB3r7K//h/AQB@vger.kernel.org, AJvYcCWcBbPx/rI21HDo3zqSayYLyXfLCGG04yJhRbPoBm7Q+AFNPd0pE5MSFYmY8PzqCl2HYh+yHPbfEr7ZXO20iKx15nc=@vger.kernel.org X-Gm-Message-State: AOJu0Yys64j6gkfpTqu3e2L/c9ixlp+TzdI+ao1OqHWHWFVKalXorDEv ZmaUtqnPOmzz+NdYce9jhG4b30p/jTydsQQysVDyz4sL1YlPx6AXv6wN X-Gm-Gg: ASbGncsjszgkVcxigER27WvYM6u+0kRusHpDaLFt4V4PXNqdYbfQuSl/rO2AXRrKrF9 3HJ8FPyKBTyBnKLsCcaRcrSPkyna5kuah8oNdjC+CHcPHEBS6e3BFPfB8OJ9QPdyWAgD75BzZ+b VUveUI0d5AHnXMxOelqrMw0rig3Lw2I5HRZCEiRwdiaS7a5v51mZsCCkQHYGtzbCl6LRHnNulMs e70oFWbZA7rMzAYdNccT+k7+GjvN3RpfuiwRmXi/E09kme3lRd6eiqQ8zsMI8e2RNswk8dwpcxJ buh/F7PIAZ7obnZ79CLnFu5U49sdnPRAA6EvHX+Gg/kTadeJF/1mcReQ3LgYdYXERBfYtLiblji yzI/uYCGKDWM= X-Google-Smtp-Source: AGHT+IGoVGmy+0cBQSC3INJh3nwC+DMd3BPjaS1S/WZ+Jo80+/MgZyl3Q2iBu4iR7criuZ+EScQZJQ== X-Received: by 2002:a05:600c:8b8b:b0:450:d3b9:4b96 with SMTP id 5b1f17b1804b1-4533cae9345mr155234975e9.13.1750167914854; Tue, 17 Jun 2025 06:45:14 -0700 (PDT) Received: from iku.Home ([2a06:5906:61b:2d00:a081:30f1:e1c7:6f28]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a568a54b7asm14239728f8f.16.2025.06.17.06.45.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 06:45:14 -0700 (PDT) From: Prabhakar X-Google-Original-From: Prabhakar To: Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Catalin Marinas , Will Deacon , Magnus Damm , Wolfram Sang Cc: linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, Prabhakar , Biju Das , Fabrizio Castro , Lad Prabhakar Subject: [PATCH v12 7/7] arm64: defconfig: Enable Renesas RZ/T2H serial SCI Date: Tue, 17 Jun 2025 14:45:04 +0100 Message-ID: <20250617134504.126313-8-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250617134504.126313-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20250617134504.126313-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Thierry Bultel Selects RZ/T2H (aka r9a09g077) SCI (serial) specific code. Signed-off-by: Thierry Bultel Signed-off-by: Lad Prabhakar Reviewed-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 96e21d458867..937ec08cb859 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -495,6 +495,7 @@ CONFIG_SERIAL_TEGRA_TCU=3Dy CONFIG_SERIAL_IMX=3Dy CONFIG_SERIAL_IMX_CONSOLE=3Dy CONFIG_SERIAL_SH_SCI=3Dy +CONFIG_SERIAL_RSCI=3Dy CONFIG_SERIAL_MSM=3Dy CONFIG_SERIAL_MSM_CONSOLE=3Dy CONFIG_SERIAL_QCOM_GENI=3Dy --=20 2.49.0