* [PATCH v3 0/7] pinctrl: realtek: Core improvements and RTD1625 support
@ 2026-03-12 11:30 Yu-Chun Lin
2026-03-12 11:30 ` [PATCH v3 1/7] dt-bindings: pincfg-node: Add input-voltage-microvolt property Yu-Chun Lin
` (5 more replies)
0 siblings, 6 replies; 16+ messages in thread
From: Yu-Chun Lin @ 2026-03-12 11:30 UTC (permalink / raw)
To: linusw, robh, krzk+dt, conor+dt, afaerber
Cc: bartosz.golaszewski, james.tai, cy.huang, stanley_chang,
eleanor.lin, tychang, linux-gpio, devicetree, linux-kernel,
linux-arm-kernel, linux-realtek-soc
This series introduces pinctrl support for the Realtek RTD1625 SoC.
Besides the new SoC support, this series improves the common Realtek pinctrl
driver and the generic pinctrl library by:
1. Introducing the generic 'input-voltage-microvolt' property to pincfg and
pinconf-generic.
2. Clarifying the 'realtek,duty-cycle' property semantics in Realtek-specific
bindings.
3. Adding support for slew rate, input voltage parameters.
I welcome feedback and suggestions.
Best regards,
Yu-Chun Lin
---
Changes in v3:
- Rebase onto the devel branch of the pinctrl tree.
- Revert realtek,pulse-width-adjust to realtek,duty-cycle.
- Fix binding example values from hexadecimal to decimal format.
- Change default value of realtek,high-vil-microvolt from 1 to 0.
- Sync driver with binding changes to handle PIN_CONFIG_SLEW_RATE as valid
numbers.
- Replace arch_initcall() with module_platform_driver().
v2: https://lore.kernel.org/lkml/20260306075244.1170399-1-eleanor.lin@realtek.com/
Yu-Chun Lin (7):
dt-bindings: pincfg-node: Add input-voltage-microvolt property
pinctrl: pinconf-generic: Add properties 'input-voltage-microvolt'
dt-bindings: pinctrl: realtek: Improve 'realtek,duty-cycle'
description
dt-bindings: pinctrl: realtek: Add RTD1625 pinctrl binding
pinctrl: realtek: add support for slew rate, input voltage and high
VIL
pinctrl: realtek: add rtd1625 pinctrl driver
arm64: dts: realtek: Add pinctrl support for RTD1625
.../bindings/pinctrl/pincfg-node.yaml | 4 +
.../pinctrl/realtek,rtd1315e-pinctrl.yaml | 7 +-
.../pinctrl/realtek,rtd1319d-pinctrl.yaml | 7 +-
.../pinctrl/realtek,rtd1619b-pinctrl.yaml | 7 +-
.../pinctrl/realtek,rtd1625-pinctrl.yaml | 260 ++
arch/arm64/boot/dts/realtek/kent.dtsi | 20 +
drivers/pinctrl/pinconf-generic.c | 2 +
drivers/pinctrl/realtek/Kconfig | 14 +
drivers/pinctrl/realtek/Makefile | 1 +
drivers/pinctrl/realtek/pinctrl-rtd.c | 66 +-
drivers/pinctrl/realtek/pinctrl-rtd.h | 37 +
drivers/pinctrl/realtek/pinctrl-rtd1625.c | 3138 +++++++++++++++++
include/linux/pinctrl/pinconf-generic.h | 3 +
13 files changed, 3559 insertions(+), 7 deletions(-)
create mode 100644 Documentation/devicetree/bindings/pinctrl/realtek,rtd1625-pinctrl.yaml
create mode 100644 drivers/pinctrl/realtek/pinctrl-rtd1625.c
--
2.34.1
^ permalink raw reply [flat|nested] 16+ messages in thread* [PATCH v3 1/7] dt-bindings: pincfg-node: Add input-voltage-microvolt property 2026-03-12 11:30 [PATCH v3 0/7] pinctrl: realtek: Core improvements and RTD1625 support Yu-Chun Lin @ 2026-03-12 11:30 ` Yu-Chun Lin 2026-03-12 17:42 ` Conor Dooley 2026-03-12 11:30 ` [PATCH v3 2/7] pinctrl: pinconf-generic: Add properties 'input-voltage-microvolt' Yu-Chun Lin ` (4 subsequent siblings) 5 siblings, 1 reply; 16+ messages in thread From: Yu-Chun Lin @ 2026-03-12 11:30 UTC (permalink / raw) To: linusw, robh, krzk+dt, conor+dt, afaerber Cc: bartosz.golaszewski, james.tai, cy.huang, stanley_chang, eleanor.lin, tychang, linux-gpio, devicetree, linux-kernel, linux-arm-kernel, linux-realtek-soc From: Tzuyi Chang <tychang@realtek.com> Add a generic pin configuration property "input-voltage-microvolt" to support hardware designs where the input logic threshold is decoupled from the power supply voltage. This property allows the pinctrl driver to configure the correct internal reference voltage for pins that need to accept input signals at a different voltage level than their power supply. For example, a pin powered by 3.3V may need to accept 1.8V logic signals. This defines the reference for VIH (Input High Voltage) and VIL (Input Low Voltage) thresholds, enabling proper signal detection across different voltage domains. Signed-off-by: Tzuyi Chang <tychang@realtek.com> Co-developed-by: Yu-Chun Lin <eleanor.lin@realtek.com> Signed-off-by: Yu-Chun Lin <eleanor.lin@realtek.com> --- Changes in v3: - Rebased onto the devel branch of the pinctrl tree. - Improved commit message and description. --- Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml b/Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml index fe936ab09104..fd49a0d53bf0 100644 --- a/Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml +++ b/Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml @@ -162,6 +162,11 @@ properties: this affects the expected delay in ps before latching a value to an output pin. + input-voltage-microvolt: + description: Specifies the input voltage level of the pin in microvolts. + This defines the reference for VIH (Input High Voltage) and VIL + (Input Low Voltage) thresholds for proper signal detection. + allOf: - if: required: -- 2.34.1 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v3 1/7] dt-bindings: pincfg-node: Add input-voltage-microvolt property 2026-03-12 11:30 ` [PATCH v3 1/7] dt-bindings: pincfg-node: Add input-voltage-microvolt property Yu-Chun Lin @ 2026-03-12 17:42 ` Conor Dooley 2026-03-12 17:44 ` Conor Dooley 0 siblings, 1 reply; 16+ messages in thread From: Conor Dooley @ 2026-03-12 17:42 UTC (permalink / raw) To: Yu-Chun Lin Cc: linusw, robh, krzk+dt, conor+dt, afaerber, bartosz.golaszewski, james.tai, cy.huang, stanley_chang, tychang, linux-gpio, devicetree, linux-kernel, linux-arm-kernel, linux-realtek-soc [-- Attachment #1: Type: text/plain, Size: 2136 bytes --] On Thu, Mar 12, 2026 at 07:30:34PM +0800, Yu-Chun Lin wrote: > From: Tzuyi Chang <tychang@realtek.com> > > Add a generic pin configuration property "input-voltage-microvolt" to > support hardware designs where the input logic threshold is decoupled > from the power supply voltage. > > This property allows the pinctrl driver to configure the correct internal > reference voltage for pins that need to accept input signals at a different > voltage level than their power supply. For example, a pin powered by 3.3V > may need to accept 1.8V logic signals. > > This defines the reference for VIH (Input High Voltage) and VIL (Input Low > Voltage) thresholds, enabling proper signal detection across different > voltage domains. > > Signed-off-by: Tzuyi Chang <tychang@realtek.com> > Co-developed-by: Yu-Chun Lin <eleanor.lin@realtek.com> > Signed-off-by: Yu-Chun Lin <eleanor.lin@realtek.com> > --- > Changes in v3: > - Rebased onto the devel branch of the pinctrl tree. > - Improved commit message and description. > --- > Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml b/Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml > index fe936ab09104..fd49a0d53bf0 100644 > --- a/Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml > +++ b/Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml > @@ -162,6 +162,11 @@ properties: > this affects the expected delay in ps before latching a value to > an output pin. > > + input-voltage-microvolt: > + description: Specifies the input voltage level of the pin in microvolts. > + This defines the reference for VIH (Input High Voltage) and VIL > + (Input Low Voltage) thresholds for proper signal detection. Should this be added here: - if: required: - input-disable then: properties: input-enable: false and made mutually exclusive with input-disable? > + > allOf: > - if: > required: > -- > 2.34.1 > [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v3 1/7] dt-bindings: pincfg-node: Add input-voltage-microvolt property 2026-03-12 17:42 ` Conor Dooley @ 2026-03-12 17:44 ` Conor Dooley 2026-03-16 9:02 ` Yu-Chun Lin [林祐君] 0 siblings, 1 reply; 16+ messages in thread From: Conor Dooley @ 2026-03-12 17:44 UTC (permalink / raw) To: Yu-Chun Lin Cc: linusw, robh, krzk+dt, conor+dt, afaerber, bartosz.golaszewski, james.tai, cy.huang, stanley_chang, tychang, linux-gpio, devicetree, linux-kernel, linux-arm-kernel, linux-realtek-soc [-- Attachment #1: Type: text/plain, Size: 2493 bytes --] On Thu, Mar 12, 2026 at 05:42:31PM +0000, Conor Dooley wrote: > On Thu, Mar 12, 2026 at 07:30:34PM +0800, Yu-Chun Lin wrote: > > From: Tzuyi Chang <tychang@realtek.com> > > > > Add a generic pin configuration property "input-voltage-microvolt" to > > support hardware designs where the input logic threshold is decoupled > > from the power supply voltage. > > > > This property allows the pinctrl driver to configure the correct internal > > reference voltage for pins that need to accept input signals at a different > > voltage level than their power supply. For example, a pin powered by 3.3V > > may need to accept 1.8V logic signals. > > > > This defines the reference for VIH (Input High Voltage) and VIL (Input Low > > Voltage) thresholds, enabling proper signal detection across different > > voltage domains. > > > > Signed-off-by: Tzuyi Chang <tychang@realtek.com> > > Co-developed-by: Yu-Chun Lin <eleanor.lin@realtek.com> > > Signed-off-by: Yu-Chun Lin <eleanor.lin@realtek.com> > > --- > > Changes in v3: > > - Rebased onto the devel branch of the pinctrl tree. > > - Improved commit message and description. > > --- > > Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml b/Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml > > index fe936ab09104..fd49a0d53bf0 100644 > > --- a/Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml > > +++ b/Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml > > @@ -162,6 +162,11 @@ properties: > > this affects the expected delay in ps before latching a value to > > an output pin. > > > > + input-voltage-microvolt: > > + description: Specifies the input voltage level of the pin in microvolts. > > + This defines the reference for VIH (Input High Voltage) and VIL > > + (Input Low Voltage) thresholds for proper signal detection. > > Should this be added here: > - if: > required: > - input-disable > then: > properties: > input-enable: false > > and made mutually exclusive with input-disable? Also looking at v1, should this be something like "input-threshold-voltage-microvolt"? "input-voltage-microvolt" doesn't seem specific enough to the described use case. > > > + > > allOf: > > - if: > > required: > > -- > > 2.34.1 > > [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: [PATCH v3 1/7] dt-bindings: pincfg-node: Add input-voltage-microvolt property 2026-03-12 17:44 ` Conor Dooley @ 2026-03-16 9:02 ` Yu-Chun Lin [林祐君] 0 siblings, 0 replies; 16+ messages in thread From: Yu-Chun Lin [林祐君] @ 2026-03-16 9:02 UTC (permalink / raw) To: Conor Dooley Cc: linusw@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, afaerber@suse.com, bartosz.golaszewski@oss.qualcomm.com, James Tai [戴志峰], CY_Huang[黃鉦晏], Stanley Chang[昌育德], TY_Chang[張子逸], linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-realtek-soc@lists.infradead.org > On Thu, Mar 12, 2026 at 05:42:31PM +0000, Conor Dooley wrote: >> On Thu, Mar 12, 2026 at 07:30:34PM +0800, Yu-Chun Lin wrote: >>> From: Tzuyi Chang <tychang@realtek.com> >>> >>> Add a generic pin configuration property "input-voltage-microvolt" >>> to support hardware designs where the input logic threshold is >>> decoupled from the power supply voltage. >>> >>> This property allows the pinctrl driver to configure the correct >>> internal reference voltage for pins that need to accept input >>> signals at a different voltage level than their power supply. For >>> example, a pin powered by 3.3V may need to accept 1.8V logic signals. >>> >>> This defines the reference for VIH (Input High Voltage) and VIL >>> (Input Low >>> Voltage) thresholds, enabling proper signal detection across >>> different voltage domains. >>> >>> Signed-off-by: Tzuyi Chang <tychang@realtek.com> >>> Co-developed-by: Yu-Chun Lin <eleanor.lin@realtek.com> >>> Signed-off-by: Yu-Chun Lin <eleanor.lin@realtek.com> >>> --- >>> Changes in v3: >>> - Rebased onto the devel branch of the pinctrl tree. >>> - Improved commit message and description. >>> --- >>> Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml | 5 >>> +++++ >>> 1 file changed, 5 insertions(+) >>> >>> diff --git >>> a/Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml >>> b/Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml >>> index fe936ab09104..fd49a0d53bf0 100644 >>> --- a/Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml >>> +++ b/Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml >>> @@ -162,6 +162,11 @@ properties: >>> this affects the expected delay in ps before latching a value to >>> an output pin. >>> >>> + input-voltage-microvolt: >>> + description: Specifies the input voltage level of the pin in microvolts. >>> + This defines the reference for VIH (Input High Voltage) and VIL >>> + (Input Low Voltage) thresholds for proper signal detection. >> >> Should this be added here: >> - if: >> required: >> - input-disable >> then: >> properties: >> input-enable: false >> >> and made mutually exclusive with input-disable? > Yes, I will add the restrict as follows: allOf: - if: required: - input-disable then: properties: input-enable: false input-voltage-microvolt: false > Also looking at v1, should this be something like "input-threshold-voltage-microvolt"? > "input-voltage-microvolt"? doesn't seem specific enough to the described use case. > Agreed. I will rename it to "input-threshold-voltage-microvolt" in v4. Best Regards, Yu-Chun > >>> + >>> allOf: >>> - if: >>> required: >>> -- >>> 2.34.1 >>> ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v3 2/7] pinctrl: pinconf-generic: Add properties 'input-voltage-microvolt' 2026-03-12 11:30 [PATCH v3 0/7] pinctrl: realtek: Core improvements and RTD1625 support Yu-Chun Lin 2026-03-12 11:30 ` [PATCH v3 1/7] dt-bindings: pincfg-node: Add input-voltage-microvolt property Yu-Chun Lin @ 2026-03-12 11:30 ` Yu-Chun Lin 2026-03-16 13:48 ` Linus Walleij 2026-03-12 11:30 ` [PATCH v3 3/7] dt-bindings: pinctrl: realtek: Improve 'realtek,duty-cycle' description Yu-Chun Lin ` (3 subsequent siblings) 5 siblings, 1 reply; 16+ messages in thread From: Yu-Chun Lin @ 2026-03-12 11:30 UTC (permalink / raw) To: linusw, robh, krzk+dt, conor+dt, afaerber Cc: bartosz.golaszewski, james.tai, cy.huang, stanley_chang, eleanor.lin, tychang, linux-gpio, devicetree, linux-kernel, linux-arm-kernel, linux-realtek-soc From: Tzuyi Chang <tychang@realtek.com> Add a new generic pin configuration parameter PIN_CONFIG_INPUT_VOLTAGE_UV. This parameter is used to specify the input voltage level of a pin in microvolts, which corresponds to the 'input-voltage-microvolt' property in Device Tree. Signed-off-by: Tzuyi Chang <tychang@realtek.com> Co-developed-by: Yu-Chun Lin <eleanor.lin@realtek.com> Signed-off-by: Yu-Chun Lin <eleanor.lin@realtek.com> --- Changes in v3: - None --- drivers/pinctrl/pinconf-generic.c | 2 ++ include/linux/pinctrl/pinconf-generic.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c index 855ca973a1c8..06cdc885a442 100644 --- a/drivers/pinctrl/pinconf-generic.c +++ b/drivers/pinctrl/pinconf-generic.c @@ -57,6 +57,7 @@ static const struct pin_config_item conf_items[] = { PCONFDUMP(PIN_CONFIG_SKEW_DELAY, "skew delay", NULL, true), PCONFDUMP(PIN_CONFIG_SKEW_DELAY_INPUT_PS, "input skew delay", "ps", true), PCONFDUMP(PIN_CONFIG_SKEW_DELAY_OUTPUT_PS, "output skew delay", "ps", true), + PCONFDUMP(PIN_CONFIG_INPUT_VOLTAGE_UV, "input voltage in microvolt", "uV", true), }; static void pinconf_generic_dump_one(struct pinctrl_dev *pctldev, @@ -203,6 +204,7 @@ static const struct pinconf_generic_params dt_params[] = { { "skew-delay", PIN_CONFIG_SKEW_DELAY, 0 }, { "skew-delay-input-ps", PIN_CONFIG_SKEW_DELAY_INPUT_PS, 0 }, { "skew-delay-output-ps", PIN_CONFIG_SKEW_DELAY_OUTPUT_PS, 0 }, + { "input-voltage-microvolt", PIN_CONFIG_INPUT_VOLTAGE_UV, 0 }, }; /** diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h index 531dc3e9b3f7..a5d4b2d8633a 100644 --- a/include/linux/pinctrl/pinconf-generic.h +++ b/include/linux/pinctrl/pinconf-generic.h @@ -83,6 +83,8 @@ struct pinctrl_map; * schmitt-trigger mode is disabled. * @PIN_CONFIG_INPUT_SCHMITT_UV: this will configure an input pin to run in * schmitt-trigger mode. The argument is in uV. + * @PIN_CONFIG_INPUT_VOLTAGE_UV: this will configure the input voltage level of + * the pin. The argument is specified in microvolts. * @PIN_CONFIG_MODE_LOW_POWER: this will configure the pin for low power * operation, if several modes of operation are supported these can be * passed in the argument on a custom form, else just use argument 1 @@ -145,6 +147,7 @@ enum pin_config_param { PIN_CONFIG_INPUT_SCHMITT, PIN_CONFIG_INPUT_SCHMITT_ENABLE, PIN_CONFIG_INPUT_SCHMITT_UV, + PIN_CONFIG_INPUT_VOLTAGE_UV, PIN_CONFIG_MODE_LOW_POWER, PIN_CONFIG_MODE_PWM, PIN_CONFIG_LEVEL, -- 2.34.1 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v3 2/7] pinctrl: pinconf-generic: Add properties 'input-voltage-microvolt' 2026-03-12 11:30 ` [PATCH v3 2/7] pinctrl: pinconf-generic: Add properties 'input-voltage-microvolt' Yu-Chun Lin @ 2026-03-16 13:48 ` Linus Walleij 0 siblings, 0 replies; 16+ messages in thread From: Linus Walleij @ 2026-03-16 13:48 UTC (permalink / raw) To: Yu-Chun Lin Cc: robh, krzk+dt, conor+dt, afaerber, bartosz.golaszewski, james.tai, cy.huang, stanley_chang, tychang, linux-gpio, devicetree, linux-kernel, linux-arm-kernel, linux-realtek-soc On Thu, Mar 12, 2026 at 12:30 PM Yu-Chun Lin <eleanor.lin@realtek.com> wrote: > From: Tzuyi Chang <tychang@realtek.com> > > Add a new generic pin configuration parameter PIN_CONFIG_INPUT_VOLTAGE_UV. > This parameter is used to specify the input voltage level of a pin in > microvolts, which corresponds to the 'input-voltage-microvolt' property > in Device Tree. > > Signed-off-by: Tzuyi Chang <tychang@realtek.com> > Co-developed-by: Yu-Chun Lin <eleanor.lin@realtek.com> > Signed-off-by: Yu-Chun Lin <eleanor.lin@realtek.com> Reviewed-by: Linus Walleij <linusw@kernel.org> Yours, Linus Walleij ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v3 3/7] dt-bindings: pinctrl: realtek: Improve 'realtek,duty-cycle' description 2026-03-12 11:30 [PATCH v3 0/7] pinctrl: realtek: Core improvements and RTD1625 support Yu-Chun Lin 2026-03-12 11:30 ` [PATCH v3 1/7] dt-bindings: pincfg-node: Add input-voltage-microvolt property Yu-Chun Lin 2026-03-12 11:30 ` [PATCH v3 2/7] pinctrl: pinconf-generic: Add properties 'input-voltage-microvolt' Yu-Chun Lin @ 2026-03-12 11:30 ` Yu-Chun Lin 2026-03-12 17:42 ` Conor Dooley 2026-03-16 13:47 ` Linus Walleij 2026-03-12 11:30 ` [PATCH v3 4/7] dt-bindings: pinctrl: realtek: Add RTD1625 pinctrl binding Yu-Chun Lin ` (2 subsequent siblings) 5 siblings, 2 replies; 16+ messages in thread From: Yu-Chun Lin @ 2026-03-12 11:30 UTC (permalink / raw) To: linusw, robh, krzk+dt, conor+dt, afaerber Cc: bartosz.golaszewski, james.tai, cy.huang, stanley_chang, eleanor.lin, tychang, linux-gpio, devicetree, linux-kernel, linux-arm-kernel, linux-realtek-soc The previous description was misleading because this hardware block is not a PWM generator. It does not generate a signal with a specific frequency and duty ratio. Instead, it provides a fixed nanosecond-level adjustment to the rising/ falling edges of an existing signal. The property name is kept as 'realtek,duty-cycle' rather than being renamed to strictly preserve Device Tree ABI backward compatibility. Signed-off-by: Yu-Chun Lin <eleanor.lin@realtek.com> --- Changes in v3: - Reverted property name change. --- .../bindings/pinctrl/realtek,rtd1315e-pinctrl.yaml | 7 +++++-- .../bindings/pinctrl/realtek,rtd1319d-pinctrl.yaml | 7 +++++-- .../bindings/pinctrl/realtek,rtd1619b-pinctrl.yaml | 7 +++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinctrl.yaml index 90bd49d87d2e..2a640e495cc7 100644 --- a/Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinctrl.yaml +++ b/Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinctrl.yaml @@ -135,8 +135,11 @@ patternProperties: realtek,duty-cycle: description: | - An integer describing the level to adjust output duty cycle, controlling - the proportion of positive and negative waveforms in nanoseconds. + An integer describing the level to adjust the output pulse width, it + provides a fixed nanosecond-level adjustment to the rising/falling + edges of an existing signal. It is used for Signal Integrity tuning + (adding/subtracting delay to fine-tune the high/low duration), rather + than generating a specific PWM frequency. Valid arguments are described as below: 0: 0ns 2: + 0.25ns diff --git a/Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinctrl.yaml index b6211c8544ca..2136546adec8 100644 --- a/Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinctrl.yaml +++ b/Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinctrl.yaml @@ -134,8 +134,11 @@ patternProperties: realtek,duty-cycle: description: | - An integer describing the level to adjust output duty cycle, controlling - the proportion of positive and negative waveforms in nanoseconds. + An integer describing the level to adjust the output pulse width, it + provides a fixed nanosecond-level adjustment to the rising/falling + edges of an existing signal. It is used for Signal Integrity tuning + (adding/subtracting delay to fine-tune the high/low duration), rather + than generating a specific PWM frequency. Valid arguments are described as below: 0: 0ns 2: + 0.25ns diff --git a/Documentation/devicetree/bindings/pinctrl/realtek,rtd1619b-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/realtek,rtd1619b-pinctrl.yaml index e88bc649cc73..e8ea1362b16d 100644 --- a/Documentation/devicetree/bindings/pinctrl/realtek,rtd1619b-pinctrl.yaml +++ b/Documentation/devicetree/bindings/pinctrl/realtek,rtd1619b-pinctrl.yaml @@ -133,8 +133,11 @@ patternProperties: realtek,duty-cycle: description: | - An integer describing the level to adjust output duty cycle, controlling - the proportion of positive and negative waveforms in nanoseconds. + An integer describing the level to adjust the output pulse width, it + provides a fixed nanosecond-level adjustment to the rising/falling + edges of an existing signal. It is used for Signal Integrity tuning + (adding/subtracting delay to fine-tune the high/low duration), rather + than generating a specific PWM frequency. Valid arguments are described as below: 0: 0ns 2: + 0.25ns -- 2.34.1 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v3 3/7] dt-bindings: pinctrl: realtek: Improve 'realtek,duty-cycle' description 2026-03-12 11:30 ` [PATCH v3 3/7] dt-bindings: pinctrl: realtek: Improve 'realtek,duty-cycle' description Yu-Chun Lin @ 2026-03-12 17:42 ` Conor Dooley 2026-03-16 13:47 ` Linus Walleij 1 sibling, 0 replies; 16+ messages in thread From: Conor Dooley @ 2026-03-12 17:42 UTC (permalink / raw) To: Yu-Chun Lin Cc: linusw, robh, krzk+dt, conor+dt, afaerber, bartosz.golaszewski, james.tai, cy.huang, stanley_chang, tychang, linux-gpio, devicetree, linux-kernel, linux-arm-kernel, linux-realtek-soc [-- Attachment #1: Type: text/plain, Size: 75 bytes --] Acked-by: Conor Dooley <conor.dooley@microchip.com> pw-bot: not-applicable [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v3 3/7] dt-bindings: pinctrl: realtek: Improve 'realtek,duty-cycle' description 2026-03-12 11:30 ` [PATCH v3 3/7] dt-bindings: pinctrl: realtek: Improve 'realtek,duty-cycle' description Yu-Chun Lin 2026-03-12 17:42 ` Conor Dooley @ 2026-03-16 13:47 ` Linus Walleij 1 sibling, 0 replies; 16+ messages in thread From: Linus Walleij @ 2026-03-16 13:47 UTC (permalink / raw) To: Yu-Chun Lin Cc: robh, krzk+dt, conor+dt, afaerber, bartosz.golaszewski, james.tai, cy.huang, stanley_chang, tychang, linux-gpio, devicetree, linux-kernel, linux-arm-kernel, linux-realtek-soc On Thu, Mar 12, 2026 at 12:30 PM Yu-Chun Lin <eleanor.lin@realtek.com> wrote: > The previous description was misleading because this hardware block is not > a PWM generator. It does not generate a signal with a specific frequency > and duty ratio. > > Instead, it provides a fixed nanosecond-level adjustment to the rising/ > falling edges of an existing signal. > > The property name is kept as 'realtek,duty-cycle' rather than being > renamed to strictly preserve Device Tree ABI backward compatibility. > > Signed-off-by: Yu-Chun Lin <eleanor.lin@realtek.com> Thanks for working this out, Reviewed-by: Linus Walleij <linusw@kernel.org> Yours, Linus Walleij ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v3 4/7] dt-bindings: pinctrl: realtek: Add RTD1625 pinctrl binding 2026-03-12 11:30 [PATCH v3 0/7] pinctrl: realtek: Core improvements and RTD1625 support Yu-Chun Lin ` (2 preceding siblings ...) 2026-03-12 11:30 ` [PATCH v3 3/7] dt-bindings: pinctrl: realtek: Improve 'realtek,duty-cycle' description Yu-Chun Lin @ 2026-03-12 11:30 ` Yu-Chun Lin 2026-03-12 17:46 ` Conor Dooley 2026-03-16 13:48 ` Linus Walleij 2026-03-12 11:30 ` [PATCH v3 5/7] pinctrl: realtek: add support for slew rate, input voltage and high VIL Yu-Chun Lin 2026-03-12 11:30 ` [PATCH v3 3/3] arm64: dts: realtek: Add pinctrl support for RTD1625 Yu-Chun Lin 5 siblings, 2 replies; 16+ messages in thread From: Yu-Chun Lin @ 2026-03-12 11:30 UTC (permalink / raw) To: linusw, robh, krzk+dt, conor+dt, afaerber Cc: bartosz.golaszewski, james.tai, cy.huang, stanley_chang, eleanor.lin, tychang, linux-gpio, devicetree, linux-kernel, linux-arm-kernel, linux-realtek-soc From: Tzuyi Chang <tychang@realtek.com> Add device tree bindings for RTD1625. Signed-off-by: Tzuyi Chang <tychang@realtek.com> Co-developed-by: Yu-Chun Lin <eleanor.lin@realtek.com> Signed-off-by: Yu-Chun Lin <eleanor.lin@realtek.com> --- Changes in v3: - Changed slew-rate to use valid numbers. - Revert realtek,pulse-width-adjust to realtek,duty-cycle. - Fixed example values from hexadecimal to decimal format. --- .../pinctrl/realtek,rtd1625-pinctrl.yaml | 260 ++++++++++++++++++ 1 file changed, 260 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/realtek,rtd1625-pinctrl.yaml diff --git a/Documentation/devicetree/bindings/pinctrl/realtek,rtd1625-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/realtek,rtd1625-pinctrl.yaml new file mode 100644 index 000000000000..9562a043707e --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/realtek,rtd1625-pinctrl.yaml @@ -0,0 +1,260 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright 2025 Realtek Semiconductor Corporation +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/realtek,rtd1625-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Realtek DHC RTD1625 Pin Controller + +maintainers: + - Tzuyi Chang <tychang@realtek.com> + - Yu-Chun Lin <eleanor.lin@realtek.com> + +description: + The Realtek DHC RTD1625 is a high-definition media processor SoC. The + RTD1625 pin controller is used to control pin function, pull-up/down + resistors, drive strength, slew rate, Schmitt trigger, power source + (I/O output voltage), input threshold domain selection and a higher-VIL mode. + +properties: + compatible: + items: + - enum: + - realtek,rtd1625-iso-pinctrl + - realtek,rtd1625-main2-pinctrl + - realtek,rtd1625-isom-pinctrl + - realtek,rtd1625-ve4-pinctrl + + reg: + maxItems: 1 + +patternProperties: + '-pins$': + type: object + allOf: + - $ref: pincfg-node.yaml# + - $ref: pinmux-node.yaml# + + properties: + pins: + items: + enum: [gpio_0, gpio_1, gpio_2, gpio_3, gpio_4, gpio_5, gpio_6, + gpio_7, gpio_8, gpio_9, gpio_10, gpio_11, gpio_12, gpio_13, + gpio_14, gpio_15, gpio_16, gpio_17, gpio_18, gpio_19, gpio_20, + gpio_21, gpio_22, gpio_23, gpio_24, gpio_25, gpio_28, gpio_29, + gpio_30, gpio_31, gpio_32, gpio_33, gpio_34, gpio_35, gpio_40, + gpio_41, gpio_42, gpio_43, gpio_44, gpio_45, gpio_46, gpio_47, + gpio_48, gpio_49, gpio_50, gpio_51, gpio_52, gpio_53, gpio_54, + gpio_55, gpio_56, gpio_57, gpio_58, gpio_59, gpio_60, gpio_61, + gpio_62, gpio_63, gpio_64, gpio_65, gpio_66, gpio_67, gpio_80, + gpio_81, gpio_82, gpio_83, gpio_84, gpio_85, gpio_86, gpio_87, + gpio_88, gpio_89, gpio_90, gpio_91, gpio_92, gpio_93, gpio_94, + gpio_95, gpio_96, gpio_97, gpio_98, gpio_99, gpio_100, + gpio_101, gpio_102, gpio_103, gpio_104, gpio_105, gpio_106, + gpio_107, gpio_108, gpio_109, gpio_110, gpio_111, gpio_112, + gpio_128, gpio_129, gpio_130, gpio_131, gpio_132, gpio_133, + gpio_134, gpio_135, gpio_136, gpio_137, gpio_138, gpio_139, + gpio_140, gpio_141, gpio_142, gpio_143, gpio_144, gpio_145, + gpio_146, gpio_147, gpio_148, gpio_149, gpio_150, gpio_151, + gpio_152, gpio_153, gpio_154, gpio_155, gpio_156, gpio_157, + gpio_158, gpio_159, gpio_160, gpio_161, gpio_162, gpio_163, + gpio_164, gpio_165, ai_i2s1_loc, ao_i2s1_loc, arm_trace_dbg_en, + csi_vdsel, ejtag_acpu_loc, ejtag_aucpu0_loc, ejtag_aucpu1_loc, + ejtag_pcpu_loc, ejtag_scpu_loc, ejtag_ve2_loc, emmc_clk, + emmc_cmd, emmc_data_0, emmc_data_1, emmc_data_2, emmc_data_3, + emmc_data_4, emmc_data_5, emmc_data_6, emmc_data_7, + emmc_dd_sb, emmc_rst_n, etn_phy_loc, hif_clk, hif_data, + hif_en, hif_rdy, hi_width, i2c6_loc, ir_rx_loc, rgmii_vdsel, + sf_en, spdif_in_mode, spdif_loc, uart0_loc, usb_cc1, usb_cc2, + ve4_uart_loc] + + function: + enum: [gpio, ai_i2s0, ai_i2s2, ai_tdm0, ai_tdm1, ai_tdm2, ao_i2s0, + ao_i2s2, ao_tdm0, ao_tdm1, ao_tdm2, csi0, csi1, csi_1v2, csi_1v8, + csi_2v5, csi_3v3, dmic0, dmic1, dmic2, dptx_hpd, edptx_hdp, emmc, + gspi0, gspi1, gspi2, hi_width_1bit, hi_width_disable, i2c0, i2c1, + i2c3, i2c4, i2c5, i2c7, iso_tristate, pcie0, pcie1, pcm, pctrl, + pwm4, pwm5, pwm6, rgmii, rgmii_1v2, rgmii_1v8, rgmii_2v5, + rgmii_3v3, rmii, sd, sdio, sf_disable, sf_enable, + spdif_in_coaxial, spdif_in_gpio, spdif_out, spi, ts0, ts1, uart1, + uart2, uart3, uart4, uart5, uart6, uart7, uart8, uart9, uart10, + usb_cc1, usb_cc2, vi0_dtv, vi1_dtv, vtc_ao_i2s, vtc_dmic, + vtc_i2s, ai_i2s1_loc0, ai_i2s1_loc1, ao_i2s0_loc0, ao_i2s0_loc1, + ao_i2s1_loc0, ao_i2s1_loc1, ao_tdm1_loc0, ao_tdm1_loc1, + etn_led_loc0, etn_led_loc1, etn_phy_loc0, etn_phy_loc1, + i2c6_loc0, i2c6_loc1, ir_rx_loc0, ir_rx_loc1, pwm0_loc0, + pwm0_loc1, pwm0_loc2, pwm0_loc3, pwm1_loc0, pwm1_loc1, pwm2_loc0, + pwm2_loc1, pwm3_loc0, pwm3_loc1, spdif_loc0, spdif_loc1, + uart0_loc0, uart0_loc1, ve4_uart_loc0, ve4_uart_loc1, + ve4_uart_loc2, acpu_ejtag_loc0, acpu_ejtag_loc1, acpu_ejtag_loc2, + aucpu0_ejtag_loc0, aucpu0_ejtag_loc1, aucpu0_ejtag_loc2, + aucpu1_ejtag_loc0, aucpu1_ejtag_loc1, aucpu1_ejtag_loc2, + aupu0_ejtag_loc1, aupu1_ejtag_loc1, gpu_ejtag_loc0, + pcpu_ejtag_loc0, pcpu_ejtag_loc1, pcpu_ejtag_loc2, + scpu_ejtag_loc0, scpu_ejtag_loc1, scpu_ejtag_loc2, + ve2_ejtag_loc0, ve2_ejtag_loc1, ve2_ejtag_loc2, pll_test_loc0, + pll_test_loc1, dbg_out1, isom_dbg_out, arm_trace_debug_disable, + arm_trace_debug_enable] + + drive-strength: + enum: [4, 8] + + bias-pull-down: true + + bias-pull-up: true + + bias-disable: true + + input-schmitt-enable: true + + input-schmitt-disable: true + + input-voltage-microvolt: + description: | + Select the input receiver voltage domain for the pin. + Valid arguments are: + - 1800000: 1.8V input logic level + - 3300000: 3.3V input logic level + enum: [1800000, 3300000] + + drive-push-pull: true + + power-source: + description: | + Valid arguments are described as below: + 0: power supply of 1.8V + 1: power supply of 3.3V + enum: [0, 1] + + slew-rate: + description: | + Valid arguments are described as below: + 1: ~1ns falling time + 10: ~10ns falling time + 20: ~20ns falling time + 30: ~30ns falling time + enum: [1, 10, 20, 30] + + realtek,drive-strength-p: + description: | + Some of pins can be driven using the P-MOS and N-MOS transistor to + achieve finer adjustments. The block-diagram representation is as + follows: + VDD + | + ||--+ + +-----o|| P-MOS-FET + | ||--+ + IN --+ +----- out + | ||--+ + +------|| N-MOS-FET + ||--+ + | + GND + The driving strength of the P-MOS/N-MOS transistors impacts the + waveform's rise/fall times. Greater driving strength results in + shorter rise/fall times. Each P-MOS and N-MOS transistor offers + 8 configurable levels (0 to 7), with higher values indicating + greater driving strength, contributing to achieving the desired + speed. + + The realtek,drive-strength-p is used to control the driving strength + of the P-MOS output. + + This value is not a simple count of transistors. Instead, it + represents a weighted configuration. There is a base driving + capability (even at value 0), and each bit adds a different weight to + the total strength. The resulting current is non-linear and varies + significantly based on the IO voltage (1.8V vs 3.3V) and the specific + pad group. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 7 + + realtek,drive-strength-n: + description: | + Similar to the realtek,drive-strength-p, the realtek,drive-strength-n + is used to control the driving strength of the N-MOS output. + + This property uses the same weighted configuration logic where values + 0-7 represent non-linear strength adjustments rather than a transistor + count. + + Higher values indicate greater driving strength, resulting in shorter + fall times. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 7 + + realtek,duty-cycle: + description: | + An integer describing the level to adjust the output pulse width, it + provides a fixed nanosecond-level adjustment to the rising/falling + edges of an existing signal. It is used for Signal Integrity tuning + (adding/subtracting delay to fine-tune the high/low duration), rather + than generating a specific PWM frequency. + + Valid arguments are described as below: + 0: 0ns + 2: + 0.25ns + 3: + 0.5ns + 4: -0.25ns + 5: -0.5ns + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [0, 2, 3, 4, 5] + + realtek,high-vil-microvolt: + description: | + The threshold value for the input receiver's LOW recognition (VIL). + + This property is used to address specific HDMI I2C compatibility + issues where some sinks (TVs) have weak pull-down capabilities and + fail to pull the bus voltage below the standard VIL threshold + (~0.7V). + + Setting this property to 1100000 (1.1V) enables a specialized input + receiver mode that raises the effective VIL threshold to improve + detection. + enum: [1100000] + + required: + - pins + + additionalProperties: false + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + pinctrl@4e000 { + compatible = "realtek,rtd1625-iso-pinctrl"; + reg = <0x4e000 0x130>; + + emmc-hs200-pins { + pins = "emmc_clk", + "emmc_cmd", + "emmc_data_0", + "emmc_data_1", + "emmc_data_2", + "emmc_data_3", + "emmc_data_4", + "emmc_data_5", + "emmc_data_6", + "emmc_data_7"; + function = "emmc"; + realtek,drive-strength-p = <2>; + realtek,drive-strength-n = <2>; + }; + + i2c-0-pins { + pins = "gpio_12", + "gpio_13"; + function = "i2c0"; + drive-strength = <4>; + }; + }; -- 2.34.1 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v3 4/7] dt-bindings: pinctrl: realtek: Add RTD1625 pinctrl binding 2026-03-12 11:30 ` [PATCH v3 4/7] dt-bindings: pinctrl: realtek: Add RTD1625 pinctrl binding Yu-Chun Lin @ 2026-03-12 17:46 ` Conor Dooley 2026-03-16 13:48 ` Linus Walleij 1 sibling, 0 replies; 16+ messages in thread From: Conor Dooley @ 2026-03-12 17:46 UTC (permalink / raw) To: Yu-Chun Lin Cc: linusw, robh, krzk+dt, conor+dt, afaerber, bartosz.golaszewski, james.tai, cy.huang, stanley_chang, tychang, linux-gpio, devicetree, linux-kernel, linux-arm-kernel, linux-realtek-soc [-- Attachment #1: Type: text/plain, Size: 620 bytes --] On Thu, Mar 12, 2026 at 07:30:37PM +0800, Yu-Chun Lin wrote: > From: Tzuyi Chang <tychang@realtek.com> > > Add device tree bindings for RTD1625. > > Signed-off-by: Tzuyi Chang <tychang@realtek.com> > Co-developed-by: Yu-Chun Lin <eleanor.lin@realtek.com> > Signed-off-by: Yu-Chun Lin <eleanor.lin@realtek.com> > --- > Changes in v3: > - Changed slew-rate to use valid numbers. > - Revert realtek,pulse-width-adjust to realtek,duty-cycle. > - Fixed example values from hexadecimal to decimal format. Modulo commentary on the new generic property, Reviewed-by: Conor Dooley <conor.dooley@microchip.com> [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v3 4/7] dt-bindings: pinctrl: realtek: Add RTD1625 pinctrl binding 2026-03-12 11:30 ` [PATCH v3 4/7] dt-bindings: pinctrl: realtek: Add RTD1625 pinctrl binding Yu-Chun Lin 2026-03-12 17:46 ` Conor Dooley @ 2026-03-16 13:48 ` Linus Walleij 1 sibling, 0 replies; 16+ messages in thread From: Linus Walleij @ 2026-03-16 13:48 UTC (permalink / raw) To: Yu-Chun Lin Cc: robh, krzk+dt, conor+dt, afaerber, bartosz.golaszewski, james.tai, cy.huang, stanley_chang, tychang, linux-gpio, devicetree, linux-kernel, linux-arm-kernel, linux-realtek-soc On Thu, Mar 12, 2026 at 12:30 PM Yu-Chun Lin <eleanor.lin@realtek.com> wrote: > From: Tzuyi Chang <tychang@realtek.com> > > Add device tree bindings for RTD1625. > > Signed-off-by: Tzuyi Chang <tychang@realtek.com> > Co-developed-by: Yu-Chun Lin <eleanor.lin@realtek.com> > Signed-off-by: Yu-Chun Lin <eleanor.lin@realtek.com> > --- > Changes in v3: > - Changed slew-rate to use valid numbers. > - Revert realtek,pulse-width-adjust to realtek,duty-cycle. > - Fixed example values from hexadecimal to decimal format. Reviewed-by: Linus Walleij <linusw@kernel.org> Yours, Linus Walleij ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v3 5/7] pinctrl: realtek: add support for slew rate, input voltage and high VIL 2026-03-12 11:30 [PATCH v3 0/7] pinctrl: realtek: Core improvements and RTD1625 support Yu-Chun Lin ` (3 preceding siblings ...) 2026-03-12 11:30 ` [PATCH v3 4/7] dt-bindings: pinctrl: realtek: Add RTD1625 pinctrl binding Yu-Chun Lin @ 2026-03-12 11:30 ` Yu-Chun Lin 2026-03-16 13:49 ` Linus Walleij 2026-03-12 11:30 ` [PATCH v3 3/3] arm64: dts: realtek: Add pinctrl support for RTD1625 Yu-Chun Lin 5 siblings, 1 reply; 16+ messages in thread From: Yu-Chun Lin @ 2026-03-12 11:30 UTC (permalink / raw) To: linusw, robh, krzk+dt, conor+dt, afaerber Cc: bartosz.golaszewski, james.tai, cy.huang, stanley_chang, eleanor.lin, tychang, linux-gpio, devicetree, linux-kernel, linux-arm-kernel, linux-realtek-soc From: Tzuyi Chang <tychang@realtek.com> Add support for configuring slew rate, input voltage level and high VIL mode. This involves updating the pin configuration parsing logic to handle PIN_CONFIG_SLEW_RATE, PIN_CONFIG_INPUT_VOLTAGE_UV and the new custom property "realtek,high-vil-microvolt". Signed-off-by: Tzuyi Chang <tychang@realtek.com> Co-developed-by: Yu-Chun Lin <eleanor.lin@realtek.com> Signed-off-by: Yu-Chun Lin <eleanor.lin@realtek.com> --- Changes in v3: - Changed default value of realtek,high-vil-microvolt from 1 to 0. - Synced with binding changes to handle PIN_CONFIG_SLEW_RATE as valid numbers. --- drivers/pinctrl/realtek/pinctrl-rtd.c | 66 ++++++++++++++++++++++++++- drivers/pinctrl/realtek/pinctrl-rtd.h | 3 ++ 2 files changed, 68 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/realtek/pinctrl-rtd.c b/drivers/pinctrl/realtek/pinctrl-rtd.c index 60dfb39bc986..c5e44e29bab1 100644 --- a/drivers/pinctrl/realtek/pinctrl-rtd.c +++ b/drivers/pinctrl/realtek/pinctrl-rtd.c @@ -37,11 +37,13 @@ struct rtd_pinctrl { #define RTD_DRIVE_STRENGH_P (PIN_CONFIG_END + 1) #define RTD_DRIVE_STRENGH_N (PIN_CONFIG_END + 2) #define RTD_DUTY_CYCLE (PIN_CONFIG_END + 3) +#define RTD_HIGH_VIL (PIN_CONFIG_END + 4) static const struct pinconf_generic_params rtd_custom_bindings[] = { {"realtek,drive-strength-p", RTD_DRIVE_STRENGH_P, 0}, {"realtek,drive-strength-n", RTD_DRIVE_STRENGH_N, 0}, {"realtek,duty-cycle", RTD_DUTY_CYCLE, 0}, + {"realtek,high-vil-microvolt", RTD_HIGH_VIL, 0}, }; static int rtd_pinctrl_get_groups_count(struct pinctrl_dev *pcdev) @@ -288,7 +290,8 @@ static int rtd_pconf_parse_conf(struct rtd_pinctrl *data, u16 strength; u32 val; u32 mask; - u32 pulsel_off, pulen_off, smt_off, curr_off, pow_off, reg_off, p_off, n_off; + u32 pulsel_off, pulen_off, smt_off, curr_off, pow_off, reg_off, p_off, n_off, + input_volt_off, sr_off, hvil_off; const char *name = data->info->pins[pinnr].name; int ret = 0; @@ -409,6 +412,67 @@ static int rtd_pconf_parse_conf(struct rtd_pinctrl *data, val = set_val ? mask : 0; break; + case PIN_CONFIG_SLEW_RATE: + if (config_desc->slew_rate_offset == NA) { + dev_err(data->dev, "Slew rate setting unsupported for pin: %s\n", name); + return -ENOTSUPP; + } + + switch (arg) { + case 1: + set_val = 0; + break; + case 10: + set_val = 1; + break; + case 20: + set_val = 2; + break; + case 30: + set_val = 3; + break; + default: + return -EINVAL; + } + + sr_off = config_desc->base_bit + config_desc->slew_rate_offset; + reg_off = config_desc->reg_offset; + mask = 0x3 << sr_off; + val = arg << sr_off; + break; + + case PIN_CONFIG_INPUT_VOLTAGE_UV: + if (config_desc->input_volt_offset == NA) { + dev_err(data->dev, "Input voltage level setting unsupported for pin:%s\n", + name); + return -ENOTSUPP; + } + + if (arg == 3300000) + set_val = 1; + else if (arg == 1800000) + set_val = 0; + else + return -EINVAL; + + input_volt_off = config_desc->base_bit + config_desc->input_volt_offset; + reg_off = config_desc->reg_offset; + + mask = BIT(input_volt_off); + val = set_val ? BIT(input_volt_off) : 0; + break; + + case RTD_HIGH_VIL: + if (config_desc->hvil_offset == NA) { + dev_err(data->dev, "High vil setting unsupported for pin:%s\n", name); + return -ENOTSUPP; + } + hvil_off = config_desc->base_bit + config_desc->hvil_offset; + reg_off = config_desc->reg_offset; + mask = BIT(hvil_off); + val = 1; + break; + case RTD_DRIVE_STRENGH_P: sconfig_desc = rtd_pinctrl_find_sconfig(data, pinnr); if (!sconfig_desc) { diff --git a/drivers/pinctrl/realtek/pinctrl-rtd.h b/drivers/pinctrl/realtek/pinctrl-rtd.h index 7fb0955ce749..02e2d8d269b5 100644 --- a/drivers/pinctrl/realtek/pinctrl-rtd.h +++ b/drivers/pinctrl/realtek/pinctrl-rtd.h @@ -34,6 +34,9 @@ struct rtd_pin_config_desc { unsigned int smt_offset; unsigned int power_offset; unsigned int curr_type; + unsigned int input_volt_offset; + unsigned int slew_rate_offset; + unsigned int hvil_offset; }; struct rtd_pin_sconfig_desc { -- 2.34.1 ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v3 5/7] pinctrl: realtek: add support for slew rate, input voltage and high VIL 2026-03-12 11:30 ` [PATCH v3 5/7] pinctrl: realtek: add support for slew rate, input voltage and high VIL Yu-Chun Lin @ 2026-03-16 13:49 ` Linus Walleij 0 siblings, 0 replies; 16+ messages in thread From: Linus Walleij @ 2026-03-16 13:49 UTC (permalink / raw) To: Yu-Chun Lin Cc: robh, krzk+dt, conor+dt, afaerber, bartosz.golaszewski, james.tai, cy.huang, stanley_chang, tychang, linux-gpio, devicetree, linux-kernel, linux-arm-kernel, linux-realtek-soc On Thu, Mar 12, 2026 at 12:30 PM Yu-Chun Lin <eleanor.lin@realtek.com> wrote: > From: Tzuyi Chang <tychang@realtek.com> > > Add support for configuring slew rate, input voltage level and high VIL > mode. This involves updating the pin configuration parsing logic to handle > PIN_CONFIG_SLEW_RATE, PIN_CONFIG_INPUT_VOLTAGE_UV and the new custom > property "realtek,high-vil-microvolt". > > Signed-off-by: Tzuyi Chang <tychang@realtek.com> > Co-developed-by: Yu-Chun Lin <eleanor.lin@realtek.com> > Signed-off-by: Yu-Chun Lin <eleanor.lin@realtek.com> Reviewed-by: Linus Walleij <linusw@kernel.org> Yours, Linus Walleij ^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v3 3/3] arm64: dts: realtek: Add pinctrl support for RTD1625 2026-03-12 11:30 [PATCH v3 0/7] pinctrl: realtek: Core improvements and RTD1625 support Yu-Chun Lin ` (4 preceding siblings ...) 2026-03-12 11:30 ` [PATCH v3 5/7] pinctrl: realtek: add support for slew rate, input voltage and high VIL Yu-Chun Lin @ 2026-03-12 11:30 ` Yu-Chun Lin 5 siblings, 0 replies; 16+ messages in thread From: Yu-Chun Lin @ 2026-03-12 11:30 UTC (permalink / raw) To: linusw, robh, krzk+dt, conor+dt, afaerber Cc: bartosz.golaszewski, james.tai, cy.huang, stanley_chang, eleanor.lin, tychang, linux-gpio, devicetree, linux-kernel, linux-arm-kernel, linux-realtek-soc Add the pinctrl nodes for the Realtek RTD1625 SoC. Signed-off-by: Yu-Chun Lin <eleanor.lin@realtek.com> --- Changes in v3: - None --- arch/arm64/boot/dts/realtek/kent.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm64/boot/dts/realtek/kent.dtsi b/arch/arm64/boot/dts/realtek/kent.dtsi index ae006ce24420..8d4293cd4c03 100644 --- a/arch/arm64/boot/dts/realtek/kent.dtsi +++ b/arch/arm64/boot/dts/realtek/kent.dtsi @@ -150,6 +150,26 @@ uart0: serial@7800 { reg-shift = <2>; status = "disabled"; }; + + iso_pinctrl: pinctrl@4e000 { + compatible = "realtek,rtd1625-iso-pinctrl"; + reg = <0x4e000 0x1a4>; + }; + + main2_pinctrl: pinctrl@4f200 { + compatible = "realtek,rtd1625-main2-pinctrl"; + reg = <0x4f200 0x50>; + }; + + isom_pinctrl: pinctrl@146200 { + compatible = "realtek,rtd1625-isom-pinctrl"; + reg = <0x146200 0x34>; + }; + + ve4_pinctrl: pinctrl@14e000 { + compatible = "realtek,rtd1625-ve4-pinctrl"; + reg = <0x14e000 0x84>; + }; }; gic: interrupt-controller@ff100000 { -- 2.34.1 ^ permalink raw reply related [flat|nested] 16+ messages in thread
end of thread, other threads:[~2026-03-16 13:49 UTC | newest] Thread overview: 16+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-03-12 11:30 [PATCH v3 0/7] pinctrl: realtek: Core improvements and RTD1625 support Yu-Chun Lin 2026-03-12 11:30 ` [PATCH v3 1/7] dt-bindings: pincfg-node: Add input-voltage-microvolt property Yu-Chun Lin 2026-03-12 17:42 ` Conor Dooley 2026-03-12 17:44 ` Conor Dooley 2026-03-16 9:02 ` Yu-Chun Lin [林祐君] 2026-03-12 11:30 ` [PATCH v3 2/7] pinctrl: pinconf-generic: Add properties 'input-voltage-microvolt' Yu-Chun Lin 2026-03-16 13:48 ` Linus Walleij 2026-03-12 11:30 ` [PATCH v3 3/7] dt-bindings: pinctrl: realtek: Improve 'realtek,duty-cycle' description Yu-Chun Lin 2026-03-12 17:42 ` Conor Dooley 2026-03-16 13:47 ` Linus Walleij 2026-03-12 11:30 ` [PATCH v3 4/7] dt-bindings: pinctrl: realtek: Add RTD1625 pinctrl binding Yu-Chun Lin 2026-03-12 17:46 ` Conor Dooley 2026-03-16 13:48 ` Linus Walleij 2026-03-12 11:30 ` [PATCH v3 5/7] pinctrl: realtek: add support for slew rate, input voltage and high VIL Yu-Chun Lin 2026-03-16 13:49 ` Linus Walleij 2026-03-12 11:30 ` [PATCH v3 3/3] arm64: dts: realtek: Add pinctrl support for RTD1625 Yu-Chun Lin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox