From patchwork Tue Jun 4 17:05:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prabhakar X-Patchwork-Id: 801890 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 A710F149DE5; Tue, 4 Jun 2024 17:05:44 +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=1717520746; cv=none; b=qj2ju6UtE8ZVlTAyKe6JNlvtX9u0tlzcdn1TbFNNddz29yCVdIX7hJ2Z+dksqLarRUmb7ZEPPfDdfLKXkaivXyW5MIemLESgsv7Mt6a2/wyq2eZAV8f4Fn4OewzKWwHSlHj+0kgRSuB0ycfkKIQlQAEE3heHHKfZnmMiqHEqGSc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717520746; c=relaxed/simple; bh=o90ck3Kd56d96IuxpeZ7QtB+L2DUKCTkGfu8HFrmCos=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=emK/aYToAEQvu8XbUZV8PMQ8s+2K8dFO6LN7Cg8DKAXe7/xug4WXPBo1ZNLerCEleG2wNMrSk9o+iuF0qNaoUKjz4qYBhJWEdq9bseoZbq4A7lH37cZnKTlc+lif8EkZ+vVJcKSbmq/mx3VQ8FcL+kIfOtckMNYY29Z2VBlmFEA= 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=mGDOd6+H; 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="mGDOd6+H" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-42138eadf64so26474205e9.3; Tue, 04 Jun 2024 10:05:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717520743; x=1718125543; 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=emdPqQMKqFtrqJJMG1PmUzoKPRvDojo50sTNZA8Nb+E=; b=mGDOd6+H53YDLjJZiqPVcNDkUiuT067eHs4sv0KZIFtGO3ul3PnDQWj+rUMbfMkn3I pnVPodxtHdmPmuio8/HjTcjUGyMg2E3stVsF7FO5RcWmcdZDm1xmM/9hKy8lWkVjEPBy TgLQDTMRTm8GAIezKnAfcRzN4frNcqzNXloydBET1gFxM/Lz0kKzYlaOSo08MSopVNMZ AekT53flA2742FeOxRHYXwsmXrEb5CK0jpimO6EEeNDHpBqPUm65HG8p7+p6825Gjbpg 5YiD2Uq64ohuodOmZWEUCk8piouWAHt0vjZCXLub11TljtlbSgfxM1+Y0bbpeAA8X1Q6 p5pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717520743; x=1718125543; 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=emdPqQMKqFtrqJJMG1PmUzoKPRvDojo50sTNZA8Nb+E=; b=WxXgvADeT/8NadS8QegPaKpPVR+6cPrm7mIHdb7e8SLopcj9qIPexmDHpdledXtHfH mXtiORonOctEg+D/UY56Kc9kM1hv6JVpCzk28hYagMr7Jpby7Z/0hjCsj/eJMRXqY3Nb j0E9oR3V+L2R6XsiGrMpm8DH6s+mX96DqJAnICYUXUQFSuQ5Onq1uqDCATZTUtN3uZjz DzkRc2GmnzlvIQ3f2X1nbZ2b6SecfoLit3/cYDOeVoFdP5xvHeg6SbbcnXFGNVyzilVn rwK/Imxz0Uq+qeZ79gsypLXNSexS2YOXQiBzdXrKgGV3GNd/PB7Vv61+SDx1edqQhaqd J+yQ== X-Forwarded-Encrypted: i=1; AJvYcCUihzVz48cY1yQFJ/MC9aVrrJ+Y2gVirPzi8QQGlU5zi9kxCMX7Eq+qKMYIi1qm2dLLuoBYzpiQLiraUUH+Niu9Ss55GdkP7C6TOy2DYoPnio0zKjvUc9EHlVVlK+FBdX8OKy0SOZicXT7E5zRdfg1xciCGI8KDp4Ivh6YEK5tqEauI4KtY1X14zGyzhjVOJzx4idLhT8dHcmPxd3q6r6tPAn8NFrogFsCn X-Gm-Message-State: AOJu0Yzl/UkygPyAcPFzQPzGTQk46mKkktFcZNIxl3NShVcKbq19G9Gi pVvGUH2+aYrG+SMRZlZpUcmF9/1wVglP79gEzlXD4V2eDyWjgJBb33mBxi9b X-Google-Smtp-Source: AGHT+IEI5Vs4fsvxPtNC5NpMwVZZaSNuM1LDF0hEzMQhuPbxGSNdCdzlzK4DjZToAlJVMjGxg3irGA== X-Received: by 2002:a7b:c8cc:0:b0:416:3f85:d49 with SMTP id 5b1f17b1804b1-421562e73f9mr2095225e9.18.1717520742731; Tue, 04 Jun 2024 10:05:42 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2500:a01:2595:4364:d152:dff3]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd04c0f2asm12244077f8f.3.2024.06.04.10.05.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 10:05:42 -0700 (PDT) From: Prabhakar X-Google-Original-From: Prabhakar To: Greg Kroah-Hartman , Jiri Slaby , Geert Uytterhoeven Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Magnus Damm , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Prabhakar , Fabrizio Castro , Lad Prabhakar , Krzysztof Kozlowski Subject: [PATCH v5 1/5] dt-bindings: serial: renesas,scif: Move ref for serial.yaml at the end Date: Tue, 4 Jun 2024 18:05:09 +0100 Message-Id: <20240604170513.522631-2-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240604170513.522631-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20240604170513.522631-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Lad Prabhakar In preparation for adding more validation checks move the ref for 'serial.yaml' to the end and also move reset check in 'allOf' block. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Reviewed-by: Krzysztof Kozlowski --- v4->v5 - no change v3->v4 - no change v2->v3 - no change --- .../bindings/serial/renesas,scif.yaml | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Documentation/devicetree/bindings/serial/renesas,scif.yaml b/Documentation/devicetree/bindings/serial/renesas,scif.yaml index f3a3eb2831e9..54f885f720f0 100644 --- a/Documentation/devicetree/bindings/serial/renesas,scif.yaml +++ b/Documentation/devicetree/bindings/serial/renesas,scif.yaml @@ -9,9 +9,6 @@ title: Renesas Serial Communication Interface with FIFO (SCIF) maintainers: - Geert Uytterhoeven -allOf: - - $ref: serial.yaml# - properties: compatible: oneOf: @@ -161,18 +158,21 @@ required: - clock-names - power-domains -if: - properties: - compatible: - contains: - enum: - - renesas,rcar-gen2-scif - - renesas,rcar-gen3-scif - - renesas,rcar-gen4-scif - - renesas,scif-r9a07g044 -then: - required: - - resets +allOf: + - $ref: serial.yaml# + + - if: + properties: + compatible: + contains: + enum: + - renesas,rcar-gen2-scif + - renesas,rcar-gen3-scif + - renesas,rcar-gen4-scif + - renesas,scif-r9a07g044 + then: + required: + - resets unevaluatedProperties: false From patchwork Tue Jun 4 17:05:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prabhakar X-Patchwork-Id: 801561 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 13812149DE3; Tue, 4 Jun 2024 17:05:45 +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=1717520747; cv=none; b=Hzs/UxONWusyqWb5Ea3W72KlH+0rxTkzC4Fr4K4IjTYgCjmk+2k02dmxnZJNuR6vQUEqw6D83WuTdC50ZGmzSmaCBUNiinc3c9XF+Vux0TZHcPDKAaUv3noFWgLPDQLzQ9PUB0170yWoTuQkX1Rp01khDc2+r7eroPERMeX5//Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717520747; c=relaxed/simple; bh=d+2x9cGMo78aTqkczPA9yowgeFOlc6t4grq1Dv/ZbPk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=RininzOPEyh69v/Z9pvhCCfpmmCvvugAtGZEzuTPMlRerpG872PF3iUPPsdroqXOsiJWH69g5vqKe+fAkVzSFBCC/kNBKc5sazQXEb9oteAQAs308Wc9mwzn/j1atYWZr4VX3eiTWDqX83wvwdgpEB8o5I+Wlt0IzAsozjw6F8s= 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=QANRQWjR; 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="QANRQWjR" Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-354f3f6c3b1so1203267f8f.2; Tue, 04 Jun 2024 10:05:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717520744; x=1718125544; 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=dgsAqME3hxSzwVXOIFIzJzM6T7MjbgDUONVzfuz1YfY=; b=QANRQWjRXbQy47iGgRnXvUdNxhSMo3q88qMEMLKnuV8IdRPta+/tOvav0kZ/PpSton ct2PhJTcGHj20AVtVQFbT6WVXB0ndngZ3G1hmHSBm0/kDXBXBe/FOR5h37BvdahxWuLw t2Gh6+ELX/OFu+VsZMBhV2t04DfHO8kfoz2x3nl2QxGCt3TLmEnRk9ZUVUyIyhNAMMxD ivPZieSB6xFevYf0oGf28vqXznHUfpUEwjwFbAzyG11fullqMlIfzhXmjzZeSzJnCzTn qJzsTI52vZPy5x7pguu0Fcf9vEx6myJB43pn6H6xhYGmlC0sJfN38Y4grtWU6tObivn6 VXlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717520744; x=1718125544; 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=dgsAqME3hxSzwVXOIFIzJzM6T7MjbgDUONVzfuz1YfY=; b=hcvhUVbpgzCybJqtOlgupk3hEjRUnVchJ/QP9lCaaeT0uJa43TnzBpXz37qry+dVMo SNyaaXitSMyC5RR8nWRR6FJuJQmBv0vEJr4LfCoa/kidgde79tIli2+VUfAOVGuAdNzW 9a4aJrr9Av2Vm/7opqUCB8UcNkvyc+GxXb2Lri1FW/mJ6dxE5So1cbTHACPcklpjO7Wl tjQNjaFNMveJD7BNjRoKjUD+jdlhfibKL7zpHn3QpDfL19PoF8JU32U7SN660kl/jv40 tTwIeX9kX2H2kkqz/z04qn8nWX/xvItx3Sz5FwgHLjno2fHIZf/lZjIbHGuVZMY0KBUI oRAA== X-Forwarded-Encrypted: i=1; AJvYcCXfK0bJOQohiDPGDMAHrT97/f5AgzPVvE02vzJ941D5+Gyye1mUjTFCKSmspxdMUEwWbxD+x2MUX5Cn5LlEwx7TyeNzNcraFyRDRXBsPxHUOcV6ZeH5cH90ycJV2mqi7UtypcpgUHHYUOhxhuGurayZFnU+dzM1xYc2twBJSIITDhY2UmTR5PNksT9B1UG3XjudxJfWc1jqCF+OyQnfoZ5I5rk1Dqr4WLxJ X-Gm-Message-State: AOJu0Yw9L12syJXH/npwKefq5Rgm0/yNSM1uMTFnr2N9etGP5fQ8a2ar qur5Fk5GLmtSVBkYsNdwxfA89pYNYI1XgONMDHHfN+ZkuX7SLI3z X-Google-Smtp-Source: AGHT+IEbyb8T4SxgcrrXFB3ksM+RBgj3AP2GOI0NxiXB6/dMujAECXAm6qQYkv2eN7AImaEh32Qojw== X-Received: by 2002:a05:6000:a84:b0:354:fb1d:694e with SMTP id ffacd0b85a97d-35e8ef09959mr17262f8f.29.1717520744175; Tue, 04 Jun 2024 10:05:44 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2500:a01:2595:4364:d152:dff3]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd04c0f2asm12244077f8f.3.2024.06.04.10.05.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 10:05:43 -0700 (PDT) From: Prabhakar X-Google-Original-From: Prabhakar To: Greg Kroah-Hartman , Jiri Slaby , Geert Uytterhoeven Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Magnus Damm , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Prabhakar , Fabrizio Castro , Lad Prabhakar , Conor Dooley Subject: [PATCH v5 2/5] dt-bindings: serial: renesas,scif: Validate 'interrupts' and 'interrupt-names' Date: Tue, 4 Jun 2024 18:05:10 +0100 Message-Id: <20240604170513.522631-3-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240604170513.522631-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20240604170513.522631-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Lad Prabhakar This commit adds support to validate the 'interrupts' and 'interrupt-names' properties for every supported SoC. This ensures proper handling and configuration of interrupt-related properties across supported platforms. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Reviewed-by: Conor Dooley --- v4->v5 - Included RB tag from Geert and Conor v3->v4 - Reverted back to v2 version of the patch. - Used suggestion from Krzysztof for interrupts - Restored RB tag from Geert v2->v3 - Listed interrupts and interrupt-names for every SoC in if check --- .../bindings/serial/renesas,scif.yaml | 73 ++++++++++++++----- 1 file changed, 55 insertions(+), 18 deletions(-) diff --git a/Documentation/devicetree/bindings/serial/renesas,scif.yaml b/Documentation/devicetree/bindings/serial/renesas,scif.yaml index 54f885f720f0..a750676064cf 100644 --- a/Documentation/devicetree/bindings/serial/renesas,scif.yaml +++ b/Documentation/devicetree/bindings/serial/renesas,scif.yaml @@ -87,11 +87,6 @@ properties: oneOf: - items: - description: A combined interrupt - - items: - - description: Error interrupt - - description: Receive buffer full interrupt - - description: Transmit buffer empty interrupt - - description: Break interrupt - items: - description: Error interrupt - description: Receive buffer full interrupt @@ -99,21 +94,17 @@ properties: - description: Break interrupt - description: Data Ready interrupt - description: Transmit End interrupt + minItems: 4 interrupt-names: - oneOf: - - items: - - const: eri - - const: rxi - - const: txi - - const: bri - - items: - - const: eri - - const: rxi - - const: txi - - const: bri - - const: dri - - const: tei + minItems: 4 + items: + - const: eri + - const: rxi + - const: txi + - const: bri + - const: dri + - const: tei clocks: minItems: 1 @@ -174,6 +165,52 @@ allOf: required: - resets + - if: + properties: + compatible: + contains: + enum: + - renesas,rcar-gen1-scif + - renesas,rcar-gen2-scif + - renesas,rcar-gen3-scif + - renesas,rcar-gen4-scif + then: + properties: + interrupts: + maxItems: 1 + + interrupt-names: false + + - if: + properties: + compatible: + contains: + enum: + - renesas,scif-r7s72100 + then: + properties: + interrupts: + minItems: 4 + maxItems: 4 + + interrupt-names: + maxItems: 4 + + - if: + properties: + compatible: + contains: + enum: + - renesas,scif-r7s9210 + - renesas,scif-r9a07g044 + then: + properties: + interrupts: + minItems: 6 + + interrupt-names: + minItems: 6 + unevaluatedProperties: false examples: From patchwork Tue Jun 4 17:05:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prabhakar X-Patchwork-Id: 801889 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 6006C13CFA3; Tue, 4 Jun 2024 17:05:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717520749; cv=none; b=IbmLAROZrlsrdHgepZs3IlUNAgh/Y5g3Svc4d3mSzR72XSJVTDoMhQlmGrEaXNrokh+KLvQcBp/oXeuNGRa3tom8om7ykwnUy33P7smW3G/SqjH7/pVVGdpdGnl7g2hpzFXkY/w+VVNhLsAyjNUh87ktf6B3HHyfUaF1OlVzA7A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717520749; c=relaxed/simple; bh=J9/dO4DLvkrkDukD/1y3jtSYWitJIJkWj03S3ytOCQc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Xk6PbivGEwvYQNiKN4I0/fOw+kaYR+34e7ZC+Hp/hNvicQiqaSrDoVB2ASbh48IbocBp9Im9Fma91Vj/wW+/XrLsGW2iXsbLjHeEKnPZ5vyprb88mehuOTdbxmPxn/HAljYI3EnJdn3lb/HUhGPHXRk4O5xAZiCd8pIbPSzbyb4= 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=jMl83VNI; arc=none smtp.client-ip=209.85.128.52 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="jMl83VNI" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-42120fc8cbfso45445405e9.2; Tue, 04 Jun 2024 10:05:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717520746; x=1718125546; 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=9sDI0tJ8DppyAzU+rIXjqFiVbixtM5M79SwvnNdus/w=; b=jMl83VNIjSS0rzbvFvQYon87wkIM6UY8ZmZ+6BQ4Ebt7pV9QUbSdrp+gslov+gbWIY /q04ki6FXgfgeGHeoMigp6Z5g4ZHHrvmBH2i9ttsCL2DV1nQ8ETN5UmzQfneCKGr/HmB Tuo6KWL3cED0wBeyLfig91wLusUbzN8wNIAPx7KW1Wnk32BBQBrtaZq0amptwbxAYhWv j1aTfCpOVZwrp/ZHLKlNTR8wCJeJynPmCM/AXX9w1KGVCmS6HTpqMKiZlkwEIFzX5Yh0 2M3sEgOjHxKOmHqz2QF97h/ytKssMeFREnazeMtkOKhzEzKbQGpf1Du8l4RQqJxxqHiV bWdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717520746; x=1718125546; 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=9sDI0tJ8DppyAzU+rIXjqFiVbixtM5M79SwvnNdus/w=; b=TX0nyeM7d1gbmWGzrVFg5rOsrVolXOA/7+iD5RIM/DhBrlF3JxlRiHo+Zv/hT0QI+8 WzBrH0MZFSAPCDiJ0IXbbh2ZIBy/NysiJ8MaV0+X3jNsloXol0VwBT+F7nRbIdygeUqQ hSMP5GMCeD6KG/bd+lBqsZZIW7M0nha9PisxW7Y7iFqK+JNJ9re6gXVPyv/4XjMzj794 uvQacXjnbXAUdlBlJytldHl+vCZ1r7UHXguc5Fkcutkc5GEP3og2ZIcyieWkSXF87HZL eGLHZkP5Aw1oNftuRFrQXvmuWKV4vXOJOx1WnI2DB0OGN/T3KpzgQwMTWjcGPDWUJWx3 UTxw== X-Forwarded-Encrypted: i=1; AJvYcCXLu6z1LzbSHyiIq9t1VPEpO8o9uskJ+zVtDkCqEXhZ2HH3W2/a3PHC+xAaJF+wkV5h22m1Rc7t+wTlZElQrldciuELBGLkzv0jad0C3R6SpQpClMXEJwJ35WJlE1BvCvwMxSVhO8X989Q6D27t4w3sjLlbYv9BaMJQuGTB1+WqEClSQw8m1FBjjYH61Mn2U34OLQHN9/NcU7VM95azp3hQhK1YON3DWieW X-Gm-Message-State: AOJu0Yyt0glSOFoCOVzWpJHtdLulYnM3qI+zTAS0qdE6EbRoDRjg8EIL weklE3PeE2ZkAid1bngo4i0eM5sgph7Yel0Y2e9dx/lQQnreutGi X-Google-Smtp-Source: AGHT+IGzvIZ7p0w249rrtOHCe8cN8FNjczXSU+jc26QrXG9ZEUWD1szVUIWpGeXmkGcgZyb3mZq+gw== X-Received: by 2002:a05:600c:4695:b0:421:3464:dc7a with SMTP id 5b1f17b1804b1-4215635875bmr1539525e9.39.1717520745333; Tue, 04 Jun 2024 10:05:45 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2500:a01:2595:4364:d152:dff3]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd04c0f2asm12244077f8f.3.2024.06.04.10.05.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 10:05:44 -0700 (PDT) From: Prabhakar X-Google-Original-From: Prabhakar To: Greg Kroah-Hartman , Jiri Slaby , Geert Uytterhoeven Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Magnus Damm , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Prabhakar , Fabrizio Castro , Lad Prabhakar , Conor Dooley Subject: [PATCH v5 3/5] dt-bindings: serial: renesas,scif: Make 'interrupt-names' property as required Date: Tue, 4 Jun 2024 18:05:11 +0100 Message-Id: <20240604170513.522631-4-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240604170513.522631-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20240604170513.522631-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Lad Prabhakar As all the SoCs having multiple interrupts have 'interrupt-names' property in their respective DTSIs, make 'interrupt-names' property as required so that we can validate them using dtbs_check. Signed-off-by: Lad Prabhakar Acked-by: Conor Dooley Reviewed-by: Geert Uytterhoeven --- v4->v5 - Included Ack from Conor - Included RB tag from Geert v3->v4 - New patch --- Documentation/devicetree/bindings/serial/renesas,scif.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/serial/renesas,scif.yaml b/Documentation/devicetree/bindings/serial/renesas,scif.yaml index a750676064cf..fcead2150874 100644 --- a/Documentation/devicetree/bindings/serial/renesas,scif.yaml +++ b/Documentation/devicetree/bindings/serial/renesas,scif.yaml @@ -180,6 +180,9 @@ allOf: maxItems: 1 interrupt-names: false + else: + required: + - interrupt-names - if: properties: From patchwork Tue Jun 4 17:05:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prabhakar X-Patchwork-Id: 801560 Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.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 EDF59149C7E; Tue, 4 Jun 2024 17:05:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717520750; cv=none; b=DxsHVDnRyPPWZtjBdHlCdQ7EOQKG4vl0X29mGFUKBK7ReYMiWIVMNMDpkSJDUKoc0TkidgYOUxpjbfo4GDYZmLQoSvI1r2XajtvylDkARhD4JKXKFtNhqQwhzoOhYwYXGSFnNhx/JcUaT1nzR51nHPX/UwPb2e4kv0tPQM+rNho= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717520750; c=relaxed/simple; bh=BdtUkINd2898uGY8MVy5MoOpjeLTkKmcgrIY3WZHniM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VdBXfglETehD7YfI0TChP9a9t7lFF1EmbZVJ3N2OPunQFHXwuXKOfGjrdu5rW2MRp0UEJDAICSn0OUUO4439nayAY2zv6/k9l6hvFMnh6s4mM+I/vthEYzUaMRKMQZepSFy46haRPNNSGceD4/olsqOFwgxqFB8ZP4OKybG8ZgM= 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=S+nJ/McF; arc=none smtp.client-ip=209.85.167.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="S+nJ/McF" Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-52b9af7a01bso3047742e87.0; Tue, 04 Jun 2024 10:05:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717520747; x=1718125547; 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=l0qGKDiX/TYXDKoMBt+mb5N3Bx9uezd6zh4HUi/zIvI=; b=S+nJ/McF4vHTE+NEPMyCO1e578uz2A9qnqlYoOzddQGNyPf2aNPLd9M24P48SJEkTa gHaxD0pF0MS3aJthJ7nla0YDluoMMoRA6cAUhWZEBmUNrb3wS5bIGxx7g8wetOhRp8C4 MjUiCAmMGL07enVus1syPFBiTQkM6fZWZLl3jPNzBP2lCT8B2DtZaSCwUrNoK2Pussk/ tYHFTMR5GIu1/c8M1zhIaaiMyVdfjJ2vdPahezv1u4aAtjrxLIwTTmWVSh8M5jgw1AHg wdcg8Qu43zBNEfIxyNmJLUyudMuv9chzYEG578eW+TAqxihq/OnJxA6v/5ooKW9KmZM9 oRTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717520747; x=1718125547; 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=l0qGKDiX/TYXDKoMBt+mb5N3Bx9uezd6zh4HUi/zIvI=; b=mu9qNIyoAizxBbBFYQ5LD7LtMQDQ7yPQkRGVBXHtelI3tt7n4VbqHS7/pHwgcUJ1hb eINN76Lvb3otFncDZzxgqi8yjQ72Fje0u/d3cP87lmuUcgCqIdWxgerC/X1w2YMy/4Wn /iWCDjLUqCfaQpwkHSRFN3hVTT2UZTTjcMzSo2EyT3eDZjEehGk5ys/TvwN98EL3pRyW U2Wkg2eHmt4gBQtaJEh9z/9/vmhaED9kJCkpKMIo5GfdJpHa4q8O8BkVqiy728RFXdkG zM8MnJbPHNtKjbY8mw4QhcasC/oIlqCMUQbaf0Uro+BqOb82mEXaRBOrjjft6DqF57c0 R4pQ== X-Forwarded-Encrypted: i=1; AJvYcCXPm/pRurXkM2rlPFapIDmLFRa7+Gvenb2ZxaLMuNRJ6YKHvO4qIDezgPHS2Mn5BXMN5VXZzdUH22lI8X7ZoKvPsH47iXwLGVGoToaseQqqfVh31lPPhcMOco2GFjiGy9/mLjqvLEvR1q1U1BH/uOnM5PocwICP2aAMwK9LXJT/WFCg7RGMKWM0CrQu9aUO+soJPv23k3rj+bnZs6a+tMg+wAJ0eNFxKNJf X-Gm-Message-State: AOJu0Yw2lgxHOb93BF9UkHSGy/kEdFJsFvMFwRp+3Sar1I7VfRhxqsiG EKDRRkpo/3rn69HbMhLTnwzfE0x5SX2uTw4EmvxgUViLNl50Sbyt X-Google-Smtp-Source: AGHT+IEdznc/06tFtVxgu3Tt2Ks6nXKtgTC5fEd4fT7CgrWMOIc4EGyOD7SpMYpsY8DEEtw/HSCGrw== X-Received: by 2002:ac2:5593:0:b0:52b:9956:541a with SMTP id 2adb3069b0e04-52bab4c967fmr108108e87.21.1717520746861; Tue, 04 Jun 2024 10:05:46 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2500:a01:2595:4364:d152:dff3]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd04c0f2asm12244077f8f.3.2024.06.04.10.05.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 10:05:45 -0700 (PDT) From: Prabhakar X-Google-Original-From: Prabhakar To: Greg Kroah-Hartman , Jiri Slaby , Geert Uytterhoeven Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Magnus Damm , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Prabhakar , Fabrizio Castro , Lad Prabhakar , Conor Dooley Subject: [PATCH v5 4/5] dt-bindings: serial: Add documentation for Renesas RZ/V2H(P) (R9A09G057) SCIF support Date: Tue, 4 Jun 2024 18:05:12 +0100 Message-Id: <20240604170513.522631-5-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240604170513.522631-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20240604170513.522631-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Lad Prabhakar Document support for the Serial Communication Interface with FIFO (SCIF) available in the Renesas RZ/V2H(P) (R9A09G057) SoC. The SCIF interface in the Renesas RZ/V2H(P) is similar to that available in the RZ/G2L (R9A07G044) SoC, with the following differences: - RZ/V2H(P) SoC has three additional interrupts: one for Tx end/Rx ready and two for Rx and Tx buffer full, all of which are edge-triggered. - RZ/V2H(P) supports asynchronous mode, whereas RZ/G2L supports both synchronous and asynchronous modes. - There are differences in the configuration of certain registers such as SCSMR, SCFCR, and SCSPTR between the two SoCs. To handle these differences in the driver, a new SoC-specific compatible string is added, ensuring proper handling of the unique features and register configurations of the RZ/V2H(P) SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Conor Dooley Reviewed-by: Geert Uytterhoeven --- v4->v5 - Included RB tag from Geert and Conor v3->v4 - Appended the interrupts instead of adding SoC specific - Added restriction for clocks and reset v2->v3 - Added SoC specific compat string --- .../bindings/serial/renesas,scif.yaml | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/Documentation/devicetree/bindings/serial/renesas,scif.yaml b/Documentation/devicetree/bindings/serial/renesas,scif.yaml index fcead2150874..afc7c05898a1 100644 --- a/Documentation/devicetree/bindings/serial/renesas,scif.yaml +++ b/Documentation/devicetree/bindings/serial/renesas,scif.yaml @@ -80,6 +80,8 @@ properties: - renesas,scif-r9a08g045 # RZ/G3S - const: renesas,scif-r9a07g044 # RZ/G2{L,LC} fallback + - const: renesas,scif-r9a09g057 # RZ/V2H(P) + reg: maxItems: 1 @@ -94,6 +96,9 @@ properties: - description: Break interrupt - description: Data Ready interrupt - description: Transmit End interrupt + - description: Transmit End/Data Ready interrupt + - description: Receive buffer full interrupt (EDGE trigger) + - description: Transmit buffer empty interrupt (EDGE trigger) minItems: 4 interrupt-names: @@ -105,6 +110,9 @@ properties: - const: bri - const: dri - const: tei + - const: tei-dri + - const: rxi-edge + - const: txi-edge clocks: minItems: 1 @@ -161,6 +169,7 @@ allOf: - renesas,rcar-gen3-scif - renesas,rcar-gen4-scif - renesas,scif-r9a07g044 + - renesas,scif-r9a09g057 then: required: - resets @@ -210,9 +219,30 @@ allOf: properties: interrupts: minItems: 6 + maxItems: 6 interrupt-names: minItems: 6 + maxItems: 6 + + - if: + properties: + compatible: + contains: + const: renesas,scif-r9a09g057 + then: + properties: + clocks: + maxItems: 1 + + clock-names: + maxItems: 1 + + interrupts: + minItems: 9 + + interrupt-names: + minItems: 9 unevaluatedProperties: false From patchwork Tue Jun 4 17:05:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prabhakar X-Patchwork-Id: 801888 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.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 E082214A4EF; Tue, 4 Jun 2024 17:05:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717520751; cv=none; b=Jy+KwR096fstTE/GISumt84MbwXGhV5ogRXbwx8C0r3X31Czcgalxtq/lOT3hCh+hjsGeEaYj53voXKoxnPK7zsgs096rZByj903g6/viSR1onql+rKV5Lqd6aInK+/+JGUxj+NZ2no23ItzZb4/k/bjnwwoQe4UrxoG3QltKTg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717520751; c=relaxed/simple; bh=S4zI23jXY5UCYhcYcLEHzR39qEGwQxMYzl57igXjnSE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=daTE/BGla4XEux5xJNlng3Js234yrT/sxMCVcN3HKo+hWRaHsYbMCFb8fwD/ivH4rZHnXdREY3t4N5b/82oZo/MIIHJoMC+sa6wx8EYamiy0C7kONQiwpVrCZ85g0KvRRWyl5BfHuuC8CJLqNqZAK3cEgxCuMV+85GI06fbGJno= 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=Bb1daZkI; arc=none smtp.client-ip=209.85.221.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="Bb1daZkI" Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-35e573c0334so10792f8f.1; Tue, 04 Jun 2024 10:05:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717520748; x=1718125548; 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=mGYHbF59iZQUuSem60N9wQ2sz32IfeHdhp9ulRawMZ0=; b=Bb1daZkIow0M7lYSmG9OSccT08lG2QKq2HZetgP6UH8dyInZJ+vMnQcgDDxq/zbloT QrlXBN//L2KUrZHeTAGCyyxUvE+vLUX+Ehdmm8/Hym5S58OcAyT6cFAN9sW2nTN3ompb OQCg2678jSbsyWu3/+9yOoLhcnhrUsxy9uR/JEXLSU3z2K6RUgbSuIPbUIiAK1JpPGPj 2Lqy5s89JNFTi0ILMbijRN9J+oJpz8QzWZn5K92YWTggtH4431TzcIiyOg1X4zQpHDOC 2NVkl0CQxFT+tMD4ILKj0NRZj1GCjso62q6wrU/p08hmOjgblVADcuTZus0xcJyfRGNN AyZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717520748; x=1718125548; 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=mGYHbF59iZQUuSem60N9wQ2sz32IfeHdhp9ulRawMZ0=; b=WnShLC7kDvY2YbtTtQpduiDyWdN/mze32JlrevfI1aHL3xK5/vt/JYF0myAXCTBU9Q G5GBpd31Xjjmuwtw5ftF7yyCR15NQkgj/glusQAnJlIPMEJTMCqZTz1iEQTI4bCXl+Vr knAWE9GlUbDlJjJXrZYpXb3RPOJp0fcGwzfXSdi6YSYRwgkbMlnKuRl5rEncQQDcfg5N SSL//ARj9wtnGdi7VLmHPp+ijrGDHqii2TrPlHDgSfGicKhe7kFydwV0R62niVjEnyvG 6TEul4FKEWP7LpNqPSsXSD9LparDCSqkVbvbMLSmQ6pRgndxog85VivQjjpq4xMBHLEw ikCQ== X-Forwarded-Encrypted: i=1; AJvYcCWhaMT1vi7BHk6MI7adPyc5S3Y++XqLMNuESYqy6skauCh5ZoIyRuZOcITnMc0mviqew6NLdHq16gpeknXbUA9ctHawWrUG1oGoh1Fhks+c/vrkfSkdQOEy8WE6/mOUGZCJCzD/zNXajX24Z8f2qCsX4dcNzjr/93dD7x06X+57mbzlqvW/+qBFcklxQO2pkg1CGiwma5lO9906H41bQzVHu/Sw3e1Tzara X-Gm-Message-State: AOJu0Yz/644BgA8JbjuJOmdXpkXicoawmhR04lkQvyop9qFJzJ0VPRMF ZEMJMaD0H0G5+3NuyvXYZdh/k3jLx4KL4Yi/dzGewj3CrD3ASJv7AyTD2/4D X-Google-Smtp-Source: AGHT+IGogEfmHMC1iFii2yLHXYzFwHrA3TajAr+bExLnDU4vduJgzcWcl+etyGfgDSl6SLve9BKF0A== X-Received: by 2002:adf:e805:0:b0:35e:537c:b1ac with SMTP id ffacd0b85a97d-35e7c59148fmr3162243f8f.34.1717520748226; Tue, 04 Jun 2024 10:05:48 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2500:a01:2595:4364:d152:dff3]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd04c0f2asm12244077f8f.3.2024.06.04.10.05.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 10:05:47 -0700 (PDT) From: Prabhakar X-Google-Original-From: Prabhakar To: Greg Kroah-Hartman , Jiri Slaby , Geert Uytterhoeven Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Magnus Damm , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Prabhakar , Fabrizio Castro , Lad Prabhakar Subject: [PATCH v5 5/5] serial: sh-sci: Add support for RZ/V2H(P) SoC Date: Tue, 4 Jun 2024 18:05:13 +0100 Message-Id: <20240604170513.522631-6-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240604170513.522631-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20240604170513.522631-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Lad Prabhakar Add serial support for RZ/V2H(P) SoC with earlycon. The SCIF interface in the Renesas RZ/V2H(P) is similar to that available in the RZ/G2L (R9A07G044) SoC, with the following differences: - RZ/V2H(P) SoC has three additional interrupts: one for Tx end/Rx ready and two for Rx and Tx buffer full, all of which are edge-triggered. - RZ/V2H(P) supports asynchronous mode, whereas RZ/G2L supports both synchronous and asynchronous modes. - There are differences in the configuration of certain registers such as SCSMR, SCFCR, and SCSPTR between the two SoCs. To handle these differences on RZ/V2H(P) SoC SCIx_RZV2H_SCIF_REGTYPE is added. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven --- Hi Geert, Ive restored your RB tag after rebase (as the changes were trival) hope that's OK. Cheers, Prabhakar v4 -> v5 - Rebased changes on top of v6.10-rc2 - Included RB tag from Geert v3 -> v4 - Added SCIx_RZV2H_SCIF_REGTYPE to handle the differences on the RZ/V2H(P) SoC v2 -> v3 - new patch --- drivers/tty/serial/sh-sci.c | 55 +++++++++++++++++++++++++++++++++---- include/linux/serial_sci.h | 1 + 2 files changed, 51 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index f738980a8b2c..b80e9a528e17 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -317,6 +317,37 @@ static const struct sci_port_params sci_port_params[SCIx_NR_REGTYPES] = { .error_clear = SCIF_ERROR_CLEAR, }, + /* + * The "SCIF" that is in RZ/V2H(P) SoC is similar to one found on RZ/G2L SoC + * with below differences, + * - Break out of interrupts are different: ERI, BRI, RXI, TXI, TEI, DRI, + * TEI-DRI, RXI-EDGE and TXI-EDGE. + * - SCSMR register does not have CM bit (BIT(7)) ie it does not support synchronous mode. + * - SCFCR register does not have SCFCR_MCE bit. + * - SCSPTR register has only bits SCSPTR_SPB2DT and SCSPTR_SPB2IO. + */ + [SCIx_RZV2H_SCIF_REGTYPE] = { + .regs = { + [SCSMR] = { 0x00, 16 }, + [SCBRR] = { 0x02, 8 }, + [SCSCR] = { 0x04, 16 }, + [SCxTDR] = { 0x06, 8 }, + [SCxSR] = { 0x08, 16 }, + [SCxRDR] = { 0x0a, 8 }, + [SCFCR] = { 0x0c, 16 }, + [SCFDR] = { 0x0e, 16 }, + [SCSPTR] = { 0x10, 16 }, + [SCLSR] = { 0x12, 16 }, + [SEMR] = { 0x14, 8 }, + }, + .fifosize = 16, + .overrun_reg = SCLSR, + .overrun_mask = SCLSR_ORER, + .sampling_rate_mask = SCI_SR(32), + .error_mask = SCIF_DEFAULT_ERROR_MASK, + .error_clear = SCIF_ERROR_CLEAR, + }, + /* * Common SH-3 SCIF definitions. */ @@ -757,7 +788,7 @@ static void sci_init_pins(struct uart_port *port, unsigned int cflag) } sci_serial_out(port, SCPDR, data); sci_serial_out(port, SCPCR, ctrl); - } else if (sci_getreg(port, SCSPTR)->size) { + } else if (sci_getreg(port, SCSPTR)->size && s->cfg->regtype != SCIx_RZV2H_SCIF_REGTYPE) { u16 status = sci_serial_in(port, SCSPTR); /* RTS# is always output; and active low, unless autorts */ @@ -2124,8 +2155,9 @@ static void sci_set_mctrl(struct uart_port *port, unsigned int mctrl) if (!(mctrl & TIOCM_RTS)) { /* Disable Auto RTS */ - sci_serial_out(port, SCFCR, - sci_serial_in(port, SCFCR) & ~SCFCR_MCE); + if (s->cfg->regtype != SCIx_RZV2H_SCIF_REGTYPE) + sci_serial_out(port, SCFCR, + sci_serial_in(port, SCFCR) & ~SCFCR_MCE); /* Clear RTS */ sci_set_rts(port, 0); @@ -2137,8 +2169,9 @@ static void sci_set_mctrl(struct uart_port *port, unsigned int mctrl) } /* Enable Auto RTS */ - sci_serial_out(port, SCFCR, - sci_serial_in(port, SCFCR) | SCFCR_MCE); + if (s->cfg->regtype != SCIx_RZV2H_SCIF_REGTYPE) + sci_serial_out(port, SCFCR, + sci_serial_in(port, SCFCR) | SCFCR_MCE); } else { /* Set RTS */ sci_set_rts(port, 1); @@ -3225,6 +3258,10 @@ static const struct of_device_id of_sci_match[] __maybe_unused = { .compatible = "renesas,scif-r9a07g044", .data = SCI_OF_DATA(PORT_SCIF, SCIx_RZ_SCIFA_REGTYPE), }, + { + .compatible = "renesas,scif-r9a09g057", + .data = SCI_OF_DATA(PORT_SCIF, SCIx_RZV2H_SCIF_REGTYPE), + }, /* Family-specific types */ { .compatible = "renesas,rcar-gen1-scif", @@ -3533,6 +3570,13 @@ static int __init rzscifa_early_console_setup(struct earlycon_device *device, return early_console_setup(device, PORT_SCIF); } +static int __init rzv2hscif_early_console_setup(struct earlycon_device *device, + const char *opt) +{ + port_cfg.regtype = SCIx_RZV2H_SCIF_REGTYPE; + return early_console_setup(device, PORT_SCIF); +} + static int __init scifa_early_console_setup(struct earlycon_device *device, const char *opt) { @@ -3553,6 +3597,7 @@ OF_EARLYCON_DECLARE(sci, "renesas,sci", sci_early_console_setup); OF_EARLYCON_DECLARE(scif, "renesas,scif", scif_early_console_setup); OF_EARLYCON_DECLARE(scif, "renesas,scif-r7s9210", rzscifa_early_console_setup); OF_EARLYCON_DECLARE(scif, "renesas,scif-r9a07g044", rzscifa_early_console_setup); +OF_EARLYCON_DECLARE(scif, "renesas,scif-r9a09g057", rzv2hscif_early_console_setup); OF_EARLYCON_DECLARE(scifa, "renesas,scifa", scifa_early_console_setup); OF_EARLYCON_DECLARE(scifb, "renesas,scifb", scifb_early_console_setup); OF_EARLYCON_DECLARE(hscif, "renesas,hscif", hscif_early_console_setup); diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h index 1c89611e0e06..0f2f50b8d28e 100644 --- a/include/linux/serial_sci.h +++ b/include/linux/serial_sci.h @@ -37,6 +37,7 @@ enum { SCIx_SH7705_SCIF_REGTYPE, SCIx_HSCIF_REGTYPE, SCIx_RZ_SCIFA_REGTYPE, + SCIx_RZV2H_SCIF_REGTYPE, SCIx_NR_REGTYPES, };