{"id":2225059,"url":"http://patchwork.ozlabs.org/api/1.1/covers/2225059/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-pwm/cover/20260420104332.153640-1-biju.das.jz@bp.renesas.com/","project":{"id":38,"url":"http://patchwork.ozlabs.org/api/1.1/projects/38/?format=json","name":"Linux PWM development","link_name":"linux-pwm","list_id":"linux-pwm.vger.kernel.org","list_email":"linux-pwm@vger.kernel.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260420104332.153640-1-biju.das.jz@bp.renesas.com>","date":"2026-04-20T10:43:17","name":"[v5,0/9] Add Renesas RZ/G3E GPT support","submitter":{"id":87968,"url":"http://patchwork.ozlabs.org/api/1.1/people/87968/?format=json","name":"Biju","email":"biju.das.au@gmail.com"},"mbox":"http://patchwork.ozlabs.org/project/linux-pwm/cover/20260420104332.153640-1-biju.das.jz@bp.renesas.com/mbox/","series":[{"id":500593,"url":"http://patchwork.ozlabs.org/api/1.1/series/500593/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-pwm/list/?series=500593","date":"2026-04-20T10:43:17","name":"Add Renesas RZ/G3E GPT support","version":5,"mbox":"http://patchwork.ozlabs.org/series/500593/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/covers/2225059/comments/","headers":{"Return-Path":"\n <linux-pwm+bounces-8634-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-pwm@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=dpYPIpNB;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c15:e001:75::12fc:5321; helo=sin.lore.kernel.org;\n envelope-from=linux-pwm+bounces-8634-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"dpYPIpNB\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.221.49","smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com"],"Received":["from sin.lore.kernel.org (sin.lore.kernel.org\n [IPv6:2600:3c15:e001:75::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fzhtF35TMz1yGs\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 20 Apr 2026 20:43:49 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id 9C5323012D45\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 20 Apr 2026 10:43:42 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 22C1339B965;\n\tMon, 20 Apr 2026 10:43:40 +0000 (UTC)","from mail-wr1-f49.google.com (mail-wr1-f49.google.com\n [209.85.221.49])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 7243138AC65\n\tfor <linux-pwm@vger.kernel.org>; Mon, 20 Apr 2026 10:43:37 +0000 (UTC)","by mail-wr1-f49.google.com with SMTP id\n ffacd0b85a97d-43d03db7f87so1822688f8f.3\n        for <linux-pwm@vger.kernel.org>; Mon, 20 Apr 2026 03:43:37 -0700 (PDT)","from localhost.localdomain\n ([2a00:23c4:a758:8a01:5f3e:f914:6f8c:72c3])\n        by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-43fe4c221cdsm28038301f8f.0.2026.04.20.03.43.34\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Mon, 20 Apr 2026 03:43:35 -0700 (PDT)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776681820; cv=none;\n b=dRi9piw4cO8/3zpnRUZiDfpA470KEDoM6O9Fc9vdfTp/Vu/Ei2rDCU4IUI/j7rIR8aENoLHzu+ui/K5vrSk8V2iJ1RoRhH3hT3y1dTjpbUj8CP/GvjkXopJTw7tqSzUg2ROTYSVoF8tWxNrYL0pGOLAVhbXRB2z9Ww/yDB62Gq4=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776681820; c=relaxed/simple;\n\tbh=6K3LBwKZtl/O5qux1dZKU/P19V+qTupizNtd2usjTr4=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=ViS0jzhYVGM+1bd9Fy6u6623O71GeueyapyHt32iFYGc/SxyRKBMbntDv1dCJOMBGzf7yvoHFhxvBjjVVWDbffjMqh5jWhBVa049czTgHr9nLwMJ1/2vtCqoEV/dOsCK4BfPBBI7YgHug50kNe8QI3peGQ5Wff609K4kIQXGtzw=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=dpYPIpNB; arc=none smtp.client-ip=209.85.221.49","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1776681816; x=1777286616;\n darn=vger.kernel.org;\n        h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n         :to:from:from:to:cc:subject:date:message-id:reply-to;\n        bh=r+YOFEVCA4Qb/vVfgbvY+5B7C1GS5CQEkyZ79MqsT48=;\n        b=dpYPIpNBtVaMRlo374KMURJjoFUHHwvAvNPVqm5Z+ONcSFjKojQ9ZcI6KP1Ky5y9ta\n         PjRN6rfPbOubK8YLfSPfO59XsTtMmSkC0cL9QFXQEs4kYOnF97hs3gUVDNYhm6PciAsQ\n         PsUn6lxgucsKoeTgk4ozWmg/7hBNlKi47MH71pZ5Ak01c1w5ZjdpycG3KwUCYp3oLKr1\n         ohXK8zwoHI100ilYA+oT5xFz+a1MBzxjXGKc+qSJd/gDH925ozHBu91/so2cZccUksh8\n         LCQS6pVaOq8pmaRLSS9pu0gxLh9xYZUs58ML7iGVc4KX/9sNV7b9iBzBsI73uZLJEhKy\n         32kw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1776681816; x=1777286616;\n        h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n         :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=r+YOFEVCA4Qb/vVfgbvY+5B7C1GS5CQEkyZ79MqsT48=;\n        b=gEmiq21xhRcPVx7pJGAtVY/vZwLw2vIJVWk8bY73liO8D+yfz7qg0kk9qVNHtdc/fh\n         RKBi5exIxKJerni52fV+gyGJe0IyE1Wk3NL9On6CQ4NgBLLKfXGegTAZJAhvh0HxAqCt\n         gJhQYaQmZMRfGkc7rW4wjaYx9odyWy9wBV3f5+1WG7Jt9NcsA36Nhf9/RgxH2VmfPWo0\n         RH+KgQLsPeJak+GDrkgFQPDWwty8HGU8DVwdCUA21AkezDrq88lBwnMelno1vL/R/XiF\n         afvhDw7o0eSCbl/7em7LpH9j3ZHtY6vm9uLQNBhrJPz3DyceXMDe/MLABC0eyzAfOTaD\n         58yw==","X-Forwarded-Encrypted":"i=1;\n AFNElJ/cU6Dy46LOTA5iHtnvS02S+DGqgCemqaKPi/nDlhIBBRIotSD6rH5tbcVRLfe2VEtl3tAe9CvOCXc=@vger.kernel.org","X-Gm-Message-State":"AOJu0Yz8JC/8iRYY8iqU9ip5HdV19Fc8kr9BsKzMczOFvjpr97+C+St4\n\tIWqcXFq+JZhHG/P6TRrlBk2NtpPaSZYYkSXkVchTD7ACrnhVz5lF1h6F","X-Gm-Gg":"AeBDieujwmJiaHaKt2mVctvGwJ3Qz403a/XNqZEy9ZiK+tBAUup4CRkJq24bBdh3AiX\n\tBGUOhQyBJKEUPxTeKNXTY+lttvdDz5bfXaHuzgx2FPh3eeBGQKc7mE+1QCFHK7gl/EOA9R/wKhU\n\tGEbc2g2XBFpnr9rE7V5sc46JCF20BxDI+Ux5dxZ9N6ZAJ+v6Kf7EVyTOBAypLm3FPX5wpfldQeQ\n\tl4VA0YC9EGHY2bJjTJI0MCr34viZ1hmp09RjSFlc5xEirgjVs3f2sqlBwK6pSxeh8JrUYFenJ+V\n\tUTILjh5JGIiUOo8znEWVTqfsZuQa7ULQoDb14f01jsQFu/o1aY7A7F1tOmbF2VArLgFtL3R7r6u\n\tABeHTxJDxZ5HjPt7B7Lt9MClzKDfNw6fjydiT8ZdA0sphFYlx2/D3uIa77xVWIrKJBkJCY2Iy+b\n\tTaQ4uFcsf4nP0vr7kJwXaV79sOFqLQZV3duJ0A0tCaK8NkXC+clu1WZAAGcdg=","X-Received":"by 2002:a5d:5f92:0:b0:43d:71f4:7ed5 with SMTP id\n ffacd0b85a97d-43fe3dc54famr20093995f8f.17.1776681815619;\n        Mon, 20 Apr 2026 03:43:35 -0700 (PDT)","From":"Biju <biju.das.au@gmail.com>","X-Google-Original-From":"Biju <biju.das.jz@bp.renesas.com>","To":"=?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <ukleinek@kernel.org>,\n Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org>,\n Conor Dooley <conor+dt@kernel.org>,\n Geert Uytterhoeven <geert+renesas@glider.be>,\n Magnus Damm <magnus.damm@gmail.com>, Philipp Zabel <p.zabel@pengutronix.de>","Cc":"Biju Das <biju.das.jz@bp.renesas.com>,\n\tlinux-pwm@vger.kernel.org,\n\tdevicetree@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tlinux-renesas-soc@vger.kernel.org,\n\tPrabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>,\n\tBiju Das <biju.das.au@gmail.com>","Subject":"[PATCH v5 0/9] Add Renesas RZ/G3E GPT support","Date":"Mon, 20 Apr 2026 11:43:17 +0100","Message-ID":"<20260420104332.153640-1-biju.das.jz@bp.renesas.com>","X-Mailer":"git-send-email 2.43.0","Precedence":"bulk","X-Mailing-List":"linux-pwm@vger.kernel.org","List-Id":"<linux-pwm.vger.kernel.org>","List-Subscribe":"<mailto:linux-pwm+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-pwm+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit"},"content":"From: Biju Das <biju.das.jz@bp.renesas.com>\n\nThis series extends the RZ/G2L GPT PWM driver with RZ/G3E SoC support.\n\nThe RZ/G3E GPT has a number of hardware differences compared to RZ/G2L:\nit exposes 16 channels (across two GPT instances of 8 channels each),\nuses a 4-bit GTCR prescaler field (versus 3-bit on RZ/G2L), and has a\ndiscontinuous prescale sequence with powers-of-2 scaling rather than the\ncontinuous powers-of-4 sequence on RZ/G2L. It also has additional clocks\nand resets (bus clock and rst_s).\n\nTo accommodate these differences cleanly the series proceeds as follows:\n\nPatches 1-2 add DT binding documentation for the renesas,poegs property\n(allowing GPT channels to be linked with POEG for output-disable) and\nimplement the corresponding driver support. This configures GTINTAD to\nroute output-disable requests to the correct POEG group and sets GTIOR\nto tri-state both output pins on an output-disable event.\n\nPatch 3 is a small cleanup removing an unused parameter from\nrzg2l_gpt_calculate_prescale().\n\nPatch 4 migrates the driver from the legacy .get_state/.apply ops to\nthe new waveform callback interface, introducing struct\nrzg2l_gpt_waveform to hold the hardware configuration (gtpr, gtccr,\nprescale) for a single channel.\n\nPatches 5-7 introduce struct rzg2l_gpt_info to capture SoC-specific\nhardware differences, adding fields for the GTCR prescaler mask\n(gtcr_tpcs), the prescaler multiplier (prescale_mult), and a\ncalculate_prescale() function pointer. This cleanly abstracts the\nper-SoC prescaler logic needed for RZ/G3E.\n\nPatch 8 adds DT binding documentation for the RZ/G3E GPT\n(renesas,r9a09g047-gpt), covering its 16-channel layout, 64 interrupts,\ndual clocks and dual resets.\n\nPatch 9 adds the RZ/G3E driver support itself, wiring up the new\nrzg3e_data match entry with its own prescale calculation, prescaler\nfield mask, and prescale multiplier.\n\nv4->v5:\n * Merged GPT linking POEG patch series here.\n * Dropped suspend/resume patch; will be added later.\n * Updated commit description for patches #2, #4, #5, and #6.\n * Replaced return type of rzg2l_gpt_poeg_init() from void to int and\n   probe() check this return value.\n * Added more error checks in rzg2l_gpt_poeg_init().\n * Added a patch to drop the unused rzg2l_gpt_chip parameter from\n   rzg2l_gpt_calculate_prescale().\n * Updated rzg2l_gpt_round_waveform_tohw() to initialize gtccr when the\n   period of the second channel is smaller.\n * Replaced period_ticks with RZG2L_MAX_TICKS for the duty_ticks maximum\n   value check in rzg2l_gpt_round_waveform_tohw().\nv3->v4:\n * Added wave form callback conversion back to this patch series.\n * Updated rzg2l_gpt_is_ch_enabled() fit into 80-character limit for\n   consistency with other functions.\n * Dropped field_{get,prep} as mainline now support it.\n * Updated commit description for patch#3\n * Retained RZG2L_GTCR_TPCS bit definitons\n * Replaced gtcr_tpcs_mask->gtcr_tpcs\n * Updated commit header and description for patch#4\n * Renamed prescale_pow_of_two_mult_factor->prescale_mult\n * Added RZG3E_GTCR_TPCS bit definition for RZ/G3E and added to\n   rzg3e_data.\n * Added error checks on suspend() and device set to operational state\n   on failure().\n * Added Rb tag from Geert for SoC dtsi.\n * Added SW_GPIO9_CAN1_STB check to gpt0 node.\nv2->v3:\n * Added Rb tag from Rob for bindings patch\n * Dropped wave form callback conversion from this patch series as\n   it is covered in another series[1]\n * Added suspend/resume support.\nv1->v2:\n * Created separate document for RZ/G3E GPT.\n * Updated commit header and description for binding patch.\n * Added waveform callback conversion to this series.\n * Collected tag.\n * Added link to hardware manual\n * Updated limitation section in driver patch.\n\nBiju Das (9):\n  dt-bindings: pwm: rzg2l-gpt: Document renesas,poegs property\n  pwm: rzg2l-gpt: Add support for gpt linking with poeg\n  pwm: rzg2l-gpt: Drop unused rzg2l_gpt_chip parameter from\n    rzg2l_gpt_calculate_prescale()\n  pwm: rzg2l-gpt: Convert to waveform callbacks\n  pwm: rzg2l-gpt: Add info variable to struct rzg2l_gpt_chip\n  pwm: rzg2l-gpt: Add prescale_mult variable to struct rzg2l_gpt_info\n  pwm: rzg2l-gpt: Add calculate_prescale() callback to struct\n    rzg2l_gpt_info\n  dt-bindings: pwm: Document RZ/G3E GPT support\n  pwm: rzg2l-gpt: Add RZ/G3E support\n\n .../bindings/pwm/renesas,rzg2l-gpt.yaml       |  23 ++\n .../bindings/pwm/renesas,rzg3e-gpt.yaml       | 323 ++++++++++++++++\n drivers/pwm/pwm-rzg2l-gpt.c                   | 360 ++++++++++++++----\n 3 files changed, 626 insertions(+), 80 deletions(-)\n create mode 100644 Documentation/devicetree/bindings/pwm/renesas,rzg3e-gpt.yaml"}