Add pinctrl driver support for Realtek DHC SoCs
Subsystems (4)
v2 cover Add pinctrl driver support for Realtek DHC SoCs
These patches add the bindings and the pinctrl drivers for Realtek DHC(Digital Home Center) RTD SoCs(RTD1619B, RTD1319D and RTD1315E).
Change log:
v1 -> v2:
1. Rename realtek,pdriver, realtek,ndriver and realtek,dcycle
2. Remove the wildcard in the compatible strings
3. Add the description for RTD1315E, RTD1319D and RTD1315E
4. Add the description for P-MOS and N-MOS driving strength
Tzuyi Chang (7):
pinctrl: realtek: Add common pinctrl driver for Realtek DHC RTD SoCs
pinctrl: realtek: Add pinctrl driver for RTD1315E
pinctrl: realtek: Add pinctrl driver for RTD1319D
pinctrl: realtek: Add pinctrl driver for RTD1619B
dt-bindings: pinctrl: realtek: add RTD1315E pinctrl binding
dt-bindings: pinctrl: realtek: add RTD1319D pinctrl binding
dt-bindings: pinctrl: realtek: add RTD1619B pinctrl binding
.../pinctrl/realtek,rtd1315e-pinctrl.yaml | 191 ++ .../pinctrl/realtek,rtd1319d-pinctrl.yaml | 189 ++ .../pinctrl/realtek,rtd1619b-pinctrl.yaml | 188 ++ drivers/pinctrl/Kconfig | 1 + drivers/pinctrl/Makefile | 1 + drivers/pinctrl/realtek/Kconfig | 23 + drivers/pinctrl/realtek/Makefile | 6 + drivers/pinctrl/realtek/pinctrl-rtd.c | 568 ++++++ drivers/pinctrl/realtek/pinctrl-rtd.h | 124 ++ drivers/pinctrl/realtek/pinctrl-rtd1315e.c | 1439 +++++++++++++++ drivers/pinctrl/realtek/pinctrl-rtd1319d.c | 1609 +++++++++++++++++ drivers/pinctrl/realtek/pinctrl-rtd1619b.c | 1601 ++++++++++++++++ 12 files changed, 5940 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinctrl.yaml create mode 100644 Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinctrl.yaml create mode 100644 Documentation/devicetree/bindings/pinctrl/realtek,rtd1619b-pinctrl.yaml create mode 100644 drivers/pinctrl/realtek/Kconfig create mode 100644 drivers/pinctrl/realtek/Makefile create mode 100644 drivers/pinctrl/realtek/pinctrl-rtd.c create mode 100644 drivers/pinctrl/realtek/pinctrl-rtd.h create mode 100644 drivers/pinctrl/realtek/pinctrl-rtd1315e.c create mode 100644 drivers/pinctrl/realtek/pinctrl-rtd1319d.c create mode 100644 drivers/pinctrl/realtek/pinctrl-rtd1619b.c
Signature · 1 line
2.41.0
PATCH v2 1/7 pinctrl: realtek: Add common pinctrl driver for Realtek DHC RTD SoCs
The RTD SoCs share a similar design for pinmux and pinconfig. This common pinctrl driver supports different variants within the RTD SoCs.
---
v1 to v2 change:
1. rename realtek,pdrive to realtek,drive-strength-p
2. rename realtek,ndrive to realtek,drive-strength-n
3. rename realtek,dcycle to realtek,duty-cycle
--- drivers/pinctrl/Kconfig | 1 + drivers/pinctrl/Makefile | 1 + drivers/pinctrl/realtek/Kconfig | 8 + drivers/pinctrl/realtek/Makefile | 3 + drivers/pinctrl/realtek/pinctrl-rtd.c | 568 ++++++++++++++++++++++++++ drivers/pinctrl/realtek/pinctrl-rtd.h | 124 ++++++ 6 files changed, 705 insertions(+) create mode 100644 drivers/pinctrl/realtek/Kconfig create mode 100644 drivers/pinctrl/realtek/Makefile create mode 100644 drivers/pinctrl/realtek/pinctrl-rtd.c create mode 100644 drivers/pinctrl/realtek/pinctrl-rtd.h
drivers/pinctrl/Kconfig +1 -0
@@ -531,6 +531,7 @@ source "drivers/pinctrl/nuvoton/Kconfig" source "drivers/pinctrl/nxp/Kconfig" source "drivers/pinctrl/pxa/Kconfig" source "drivers/pinctrl/qcom/Kconfig" +source "drivers/pinctrl/realtek/Kconfig" source "drivers/pinctrl/renesas/Kconfig" source "drivers/pinctrl/samsung/Kconfig" source "drivers/pinctrl/spear/Kconfig"
drivers/pinctrl/Makefile +1 -0
@@ -67,6 +67,7 @@ obj-y += nuvoton/ obj-y += nxp/ obj-$(CONFIG_PINCTRL_PXA) += pxa/ obj-y += qcom/ +obj-$(CONFIG_ARCH_REALTEK) += realtek/ obj-$(CONFIG_PINCTRL_RENESAS) += renesas/ obj-$(CONFIG_PINCTRL_SAMSUNG) += samsung/ obj-$(CONFIG_PINCTRL_SPEAR) += spear/
drivers/pinctrl/realtek/Kconfig new file +8 -0
@@ -0,0 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +config PINCTRL_RTD + tristate "Realtek DHC core pin controller driver" + depends on ARCH_REALTEK + default y + select PINMUX + select GENERIC_PINCONF
drivers/pinctrl/realtek/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Realtek DHC pin control drivers +obj-$(CONFIG_PINCTRL_RTD) += pinctrl-rtd.o
drivers/pinctrl/realtek/pinctrl-rtd.c new file +568 -0
568 lines not on this page · raw message
drivers/pinctrl/realtek/pinctrl-rtd.h new file +124 -0
124 lines not on this page · raw message
Signature · 1 line
2.41.0
Re: [PATCH v2 1/7] pinctrl: realtek: Add common pinctrl driver for Realtek DHC RTD SoCs
Hi Tzuyi,
thanks for the new version! This is starting to look really good.
Quoted 5 lines · Tzuyi Chang
The RTD SoCs share a similar design for pinmux and pinconfig. This common pinctrl driver supports different variants within the RTD SoCs.
Signed-off-by Tzuyi Chang <[email protected]>
(...)
drivers/pinctrl/realtek/pinctrl-rtd.c line 161
Quoted 9 lines
drivers/pinctrl/realtek/pinctrl-rtd.c new file +9
-0+static void rtd_pinctrl_update_bits (struct rtd_pinctrl *data,unsigned int offset, +unsigned int mask,unsigned int val) +{ +unsigned int reg =readl_relaxed (data->base + offset); + + reg &= ~mask; + reg |= (mask & val); +writel_relaxed (reg, data->base + offset); +}
This function is essentially a reimplementation of regmap_update_bits() using regmap_mmio with .user_relaxed_mmio property set in the config.
Have you considered just using regmap-mmio for this?
Yours,
Linus Walleij
RE: [PATCH v2 1/7] pinctrl: realtek: Add common pinctrl driver for Realtek DHC RTD SoCs
Hi Linus,
Quoted 25 lines
Hi Tzuyi,
thanks for the new version! This is starting to look really good.
Quoted 5 lines · Tzuyi Chang
The RTD SoCs share a similar design for pinmux and pinconfig. This common pinctrl driver supports different variants within the RTD SoCs.
Signed-off-by Tzuyi Chang <[email protected]>(...)
drivers/pinctrl/realtek/pinctrl-rtd.c
Quoted 8 lines
drivers/pinctrl/realtek/pinctrl-rtd.c new file +8
-0+static void rtd_pinctrl_update_bits (struct rtd_pinctrl *data,unsigned int offset, +unsigned int mask,unsigned int +val) { +unsigned int reg =readl_relaxed (data->base + offset); + + reg &= ~mask; + reg |= (mask & val); +writel_relaxed (reg, data->base + offset); }This function is essentially a reimplementation of
regmap_update_bits()usingregmap_mmiowith .user_relaxed_mmio property set in the config.
Quoted 2 lines
Have you considered just using regmap-mmio for this?
Thank you for the suggestion. I'll use regmap_mmio to replace it in the next version.
Quoted 2 lines
Yours,
Linus Walleij
Thanks,
Tzuyi Chang
PATCH v2 2/7 pinctrl: realtek: Add pinctrl driver for RTD1315E
In reply to Tzuyi ChangAdd RTD1315E support using realtek common pinctrl driver.
---
v1 to v2 change:
1. Remove wildcard in compatible strings. Use
"realtek,rtd1315e-pinctrl" instead.
--- drivers/pinctrl/realtek/Kconfig | 5 + drivers/pinctrl/realtek/Makefile | 1 + drivers/pinctrl/realtek/pinctrl-rtd1315e.c | 1439 ++++++++++++++++++++ 3 files changed, 1445 insertions(+) create mode 100644 drivers/pinctrl/realtek/pinctrl-rtd1315e.c
drivers/pinctrl/realtek/Kconfig +5 -0
@@ -6,3 +6,8 @@ config PINCTRL_RTD default y select PINMUX select GENERIC_PINCONF + +config PINCTRL_RTD1315E + tristate "Realtek DHC 1315E pin controller driver" + depends on PINCTRL_RTD + default y
drivers/pinctrl/realtek/Makefile +1 -0
@@ -1,3 +1,4 @@ # SPDX-License-Identifier: GPL-2.0-or-later # Realtek DHC pin control drivers obj-$(CONFIG_PINCTRL_RTD) += pinctrl-rtd.o +obj-$(CONFIG_PINCTRL_RTD1315E) += pinctrl-rtd1315e.o
drivers/pinctrl/realtek/pinctrl-rtd1315e.c new file +1439 -0
1,439 lines not on this page · raw message
Signature · 1 line
2.41.0
PATCH v2 3/7 pinctrl: realtek: Add pinctrl driver for RTD1319D
In reply to Tzuyi ChangAdd RTD1319D support using realtek common pinctrl driver.
---
v1 to v2 change:
1. Remove wildcard in compatible strings. Use
"realtek,rtd1319d-pinctrl" instead.
--- drivers/pinctrl/realtek/Kconfig | 5 + drivers/pinctrl/realtek/Makefile | 1 + drivers/pinctrl/realtek/pinctrl-rtd1319d.c | 1609 ++++++++++++++++++++ 3 files changed, 1615 insertions(+) create mode 100644 drivers/pinctrl/realtek/pinctrl-rtd1319d.c
drivers/pinctrl/realtek/Kconfig +5 -0
@@ -7,6 +7,11 @@ config PINCTRL_RTD select PINMUX select GENERIC_PINCONF +config PINCTRL_RTD1319D + tristate "Realtek DHC 1319D pin controller driver" + depends on PINCTRL_RTD + default y + config PINCTRL_RTD1315E tristate "Realtek DHC 1315E pin controller driver" depends on PINCTRL_RTD
drivers/pinctrl/realtek/Makefile +1 -0
@@ -1,4 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later # Realtek DHC pin control drivers obj-$(CONFIG_PINCTRL_RTD) += pinctrl-rtd.o +obj-$(CONFIG_PINCTRL_RTD1319D) += pinctrl-rtd1319d.o obj-$(CONFIG_PINCTRL_RTD1315E) += pinctrl-rtd1315e.o
drivers/pinctrl/realtek/pinctrl-rtd1319d.c new file +1609 -0
1,609 lines not on this page · raw message
Signature · 1 line
2.41.0
PATCH v2 4/7 pinctrl: realtek: Add pinctrl driver for RTD1619B
In reply to Tzuyi ChangAdd RTD1619B support using realtek common pinctrl driver.
---
v1 to v2 change:
1. Remove wildcard in compatible strings. Use
"realtek,rtd1619b-pinctrl" instead.
--- drivers/pinctrl/realtek/Kconfig | 5 + drivers/pinctrl/realtek/Makefile | 1 + drivers/pinctrl/realtek/pinctrl-rtd1619b.c | 1601 ++++++++++++++++++++ 3 files changed, 1607 insertions(+) create mode 100644 drivers/pinctrl/realtek/pinctrl-rtd1619b.c
drivers/pinctrl/realtek/Kconfig +5 -0
@@ -7,6 +7,11 @@ config PINCTRL_RTD select PINMUX select GENERIC_PINCONF +config PINCTRL_RTD1619B + tristate "Realtek DHC 1619B pin controller driver" + depends on PINCTRL_RTD + default y + config PINCTRL_RTD1319D tristate "Realtek DHC 1319D pin controller driver" depends on PINCTRL_RTD
drivers/pinctrl/realtek/Makefile +1 -0
@@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-or-later # Realtek DHC pin control drivers obj-$(CONFIG_PINCTRL_RTD) += pinctrl-rtd.o +obj-$(CONFIG_PINCTRL_RTD1619B) += pinctrl-rtd1619b.o obj-$(CONFIG_PINCTRL_RTD1319D) += pinctrl-rtd1319d.o obj-$(CONFIG_PINCTRL_RTD1315E) += pinctrl-rtd1315e.o
drivers/pinctrl/realtek/pinctrl-rtd1619b.c new file +1601 -0
1,601 lines not on this page · raw message
Signature · 1 line
2.41.0
PATCH v2 5/7 dt-bindings: pinctrl: realtek: add RTD1315E pinctrl binding
In reply to Tzuyi ChangAdd device tree bindings for RTD1315E.
---
v1 to v2 change:
1. Add a description for RTD1315E.
2. Rename realtek,pdrive, realtekmndrive and realtek,dcycle.
3. Add a description for PMOS and NMOS driving strength.
4. Remove the wildcard in the compatible strings.
5. Use '-pins$' to be node name pattern.
--- .../pinctrl/realtek,rtd1315e-pinctrl.yaml | 191 ++++++++++++++++++ 1 file changed, 191 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinctrl.yaml
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinctrl.yaml new file +191 -0
@@ -0,0 +1,191 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright 2023 Realtek Semiconductor Corporation +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/realtek,rtd1315e-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Realtek DHC RTD1315E Pin Controller + +maintainers: + - TY Chang <[email protected]> + +description: + The Realtek DHC RTD1315E is a high-definition media processor SoC. The + RTD1315E pin controller is used to control pin function, pull up/down + resistor, drive strength, schmitt trigger and power source. + +properties: + compatible: + const: realtek,rtd1315e-pinctrl + + reg: + maxItems: 1 + +patternProperties: + '-pins$': + if: + type: object + then: + allOf: + - $ref: pincfg-node.yaml# + - $ref: pinmux-node.yaml# + + properties: + pins: + items: + enum: [ gpio_0, gpio_1, emmc_rst_n, emmc_dd_sb, emmc_clk, emmc_cmd, + 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, emmc_data_0, emmc_data_1, emmc_data_2, usb_cc2, gpio_25, + gpio_26, gpio_27, gpio_28, gpio_29, gpio_30, gpio_31, gpio_32, + gpio_33, gpio_34, gpio_35, hif_data, hif_en, hif_rdy, hif_clk, + gpio_dummy_40, gpio_dummy_41, gpio_dummy_42, gpio_dummy_43, + gpio_dummy_44, gpio_dummy_45, gpio_46, gpio_47, gpio_48, gpio_49, + gpio_50, usb_cc1, emmc_data_3, emmc_data_4, ir_rx, ur0_rx, ur0_tx, + gpio_57, gpio_58, gpio_59, gpio_60, gpio_61, gpio_62, gpio_dummy_63, + gpio_dummy_64, gpio_dummy_65, gpio_66, gpio_67, gpio_68, gpio_69, + gpio_70, gpio_71, gpio_72, gpio_dummy_73, emmc_data_5, emmc_data_6, + emmc_data_7, gpio_dummy_77, gpio_78, gpio_79, gpio_80, gpio_81, + ur2_loc, gspi_loc, hi_width, sf_en, arm_trace_dbg_en, + ejtag_aucpu_loc, ejtag_acpu_loc, ejtag_vcpu_loc, ejtag_scpu_loc, + dmic_loc, vtc_dmic_loc, vtc_tdm_loc, vtc_i2si_loc, tdm_ai_loc, + ai_loc, spdif_loc, hif_en_loc, scan_switch, wd_rset, boot_sel, + reset_n, testmode ] + + function: + enum: [ gpio, nf, emmc, ao, gspi_loc0, gspi_loc1, uart0, uart1, + uart2_loc0, uart2_loc1, i2c0, i2c1, i2c4, i2c5, pcie1, + etn_led, etn_phy, spi, pwm0_loc0, pwm0_loc1, pwm1_loc0, + pwm1_loc1, pwm2_loc0, pwm2_loc1, pwm3_loc0, pwm3_loc1, + spdif_optical_loc0, spdif_optical_loc1, usb_cc1, usb_cc2, + sd, dmic_loc0, dmic_loc1, ai_loc0, ai_loc1, tdm_ai_loc0, + tdm_ai_loc1, hi_loc0, hi_m, vtc_i2so, vtc_i2si_loc0, + vtc_i2si_loc1, vtc_dmic_loc0, vtc_dmic_loc1, vtc_tdm_loc0, + vtc_tdm_loc1, dc_fan, pll_test_loc0, pll_test_loc1, + ir_rx, uart2_disable, gspi_disable, hi_width_disable, + hi_width_1bit, sf_disable, sf_enable, scpu_ejtag_loc0, + scpu_ejtag_loc1, scpu_ejtag_loc2, scpu_ejtag_loc3, + acpu_ejtag_loc0, acpu_ejtag_loc1, acpu_ejtag_loc2, + vcpu_ejtag_loc0, vcpu_ejtag_loc1, vcpu_ejtag_loc2, + aucpu_ejtag_loc0, aucpu_ejtag_loc1, aucpu_ejtag_loc2, + gpu_ejtag, iso_tristate, dbg_out0, dbg_out1, standby_dbg, + spdif, arm_trace_debug_disable, arm_trace_debug_enable, + aucpu_ejtag_disable, acpu_ejtag_disable, vcpu_ejtag_disable, + scpu_ejtag_disable, vtc_dmic_loc_disable, vtc_tdm_disable, + vtc_i2si_disable, tdm_ai_disable, ai_disable, spdif_disable, + hif_disable, hif_enable, test_loop, pmic_pwrup ] + + + drive-strength: + enum: [4, 8] + + bias-pull-down: true + + bias-pull-up: true + + bias-disable: true + + input-schmitt-enable: true + + input-schmitt-disable: true + + 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] + + 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. + $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. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 7 + + realtek,duty-cycle: + description: | + An integer describing the level to adjust output duty cycle, controlling + the proportion of positive and negative waveforms in nanoseconds. + 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 ] + + required: + - pins + + additionalProperties: false + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + pinctrl@4e000 { + compatible = "realtek,rtd1315e-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 = <0x2>; + realtek,drive-strength-n = <0x2>; + }; + + i2c-0-pins { + pins = "gpio_12", + "gpio_13"; + function = "i2c0"; + drive-strength = <4>; + }; + };
Signature · 1 line
2.41.0
Rob Herring
maintainerRe: [PATCH v2 5/7] dt-bindings: pinctrl: realtek: add RTD1315E pinctrl binding
Quoted 40 lines · Tzuyi Chang
Add device tree bindings for RTD1315E.
Signed-off-by Tzuyi Chang <[email protected]>---
v1 to v2 change:
1. Add a description for RTD1315E.
2. Rename realtek,pdrive, realtekmndrive and realtek,dcycle.
3. Add a description for PMOS and NMOS driving strength.
4. Remove the wildcard in the compatible strings.
5. Use '-pins$' to be node name pattern.--- .../pinctrl/realtek,rtd1315e-pinctrl.yaml | 191 ++++++++++++++++++ 1 file changed, 191 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinctrl.yamlDocumentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinctrl.yaml new file +19
-0@@ -0,0 +1,191 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright 2023 Realtek Semiconductor Corporation +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/realtek,rtd1315e-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Realtek DHC RTD1315E Pin Controller + +maintainers: + - TY Chang <[email protected]> + +description: + The Realtek DHC RTD1315E is a high-definition media processor SoC. The + RTD1315E pin controller is used to control pin function, pull up/down + resistor, drive strength, schmitt trigger and power source. + +properties: + compatible:
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinctrl.yaml line 29
Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinctrl.yaml new file +10
-0+ const: realtek,rtd1315e-pinctrl + + reg: + maxItems: 1 + +patternProperties: + '-pins$': + if: + type: object + then:
Drop the if/then. "-pins" should always be a node (object).
Quoted 165 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinctrl.yaml new file +162
-0+ allOf: + - $ref: pincfg-node.yaml# + - $ref: pinmux-node.yaml# + + properties: + pins: + items: + enum: [ gpio_0, gpio_1, emmc_rst_n, emmc_dd_sb, emmc_clk, emmc_cmd, + 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, emmc_data_0, emmc_data_1, emmc_data_2, usb_cc2, gpio_25, + gpio_26, gpio_27, gpio_28, gpio_29, gpio_30, gpio_31, gpio_32, + gpio_33, gpio_34, gpio_35, hif_data, hif_en, hif_rdy, hif_clk, + gpio_dummy_40, gpio_dummy_41, gpio_dummy_42, gpio_dummy_43, + gpio_dummy_44, gpio_dummy_45, gpio_46, gpio_47, gpio_48, gpio_49, + gpio_50, usb_cc1, emmc_data_3, emmc_data_4, ir_rx, ur0_rx, ur0_tx, + gpio_57, gpio_58, gpio_59, gpio_60, gpio_61, gpio_62, gpio_dummy_63, + gpio_dummy_64, gpio_dummy_65, gpio_66, gpio_67, gpio_68, gpio_69, + gpio_70, gpio_71, gpio_72, gpio_dummy_73, emmc_data_5, emmc_data_6, + emmc_data_7, gpio_dummy_77, gpio_78, gpio_79, gpio_80, gpio_81, + ur2_loc, gspi_loc, hi_width, sf_en, arm_trace_dbg_en, + ejtag_aucpu_loc, ejtag_acpu_loc, ejtag_vcpu_loc, ejtag_scpu_loc, + dmic_loc, vtc_dmic_loc, vtc_tdm_loc, vtc_i2si_loc, tdm_ai_loc, + ai_loc, spdif_loc, hif_en_loc, scan_switch, wd_rset, boot_sel, + reset_n, testmode ] + + function: + enum: [ gpio, nf, emmc, ao, gspi_loc0, gspi_loc1, uart0, uart1, + uart2_loc0, uart2_loc1, i2c0, i2c1, i2c4, i2c5, pcie1, + etn_led, etn_phy, spi, pwm0_loc0, pwm0_loc1, pwm1_loc0, + pwm1_loc1, pwm2_loc0, pwm2_loc1, pwm3_loc0, pwm3_loc1, + spdif_optical_loc0, spdif_optical_loc1, usb_cc1, usb_cc2, + sd, dmic_loc0, dmic_loc1, ai_loc0, ai_loc1, tdm_ai_loc0, + tdm_ai_loc1, hi_loc0, hi_m, vtc_i2so, vtc_i2si_loc0, + vtc_i2si_loc1, vtc_dmic_loc0, vtc_dmic_loc1, vtc_tdm_loc0, + vtc_tdm_loc1, dc_fan, pll_test_loc0, pll_test_loc1, + ir_rx, uart2_disable, gspi_disable, hi_width_disable, + hi_width_1bit, sf_disable, sf_enable, scpu_ejtag_loc0, + scpu_ejtag_loc1, scpu_ejtag_loc2, scpu_ejtag_loc3, + acpu_ejtag_loc0, acpu_ejtag_loc1, acpu_ejtag_loc2, + vcpu_ejtag_loc0, vcpu_ejtag_loc1, vcpu_ejtag_loc2, + aucpu_ejtag_loc0, aucpu_ejtag_loc1, aucpu_ejtag_loc2, + gpu_ejtag, iso_tristate, dbg_out0, dbg_out1, standby_dbg, + spdif, arm_trace_debug_disable, arm_trace_debug_enable, + aucpu_ejtag_disable, acpu_ejtag_disable, vcpu_ejtag_disable, + scpu_ejtag_disable, vtc_dmic_loc_disable, vtc_tdm_disable, + vtc_i2si_disable, tdm_ai_disable, ai_disable, spdif_disable, + hif_disable, hif_enable, test_loop, pmic_pwrup ] + + + drive-strength: + enum: [4, 8] + + bias-pull-down: true + + bias-pull-up: true + + bias-disable: true + + input-schmitt-enable: true + + input-schmitt-disable: true + + 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] + + 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. + $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. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 7 + + realtek,duty-cycle: + description: | + An integer describing the level to adjust output duty cycle, controlling + the proportion of positive and negative waveforms in nanoseconds. + 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 ] + + required: + - pins + + additionalProperties: false + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + pinctrl@4e000 { + compatible = "realtek,rtd1315e-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 = <0x2>; + realtek,drive-strength-n = <0x2>; + }; + + i2c-0-pins { + pins = "gpio_12", + "gpio_13"; + function = "i2c0"; + drive-strength = <4>; + }; + };Signature · 1 line
2.41.0
RE: [PATCH v2 5/7] dt-bindings: pinctrl: realtek: add RTD1315E pinctrl binding
Hi Rob,
Quoted 54 lines · Tzuyi Chang
Quoted 53 lines
Add device tree bindings for RTD1315E.
Signed-off-by Tzuyi Chang <[email protected]>---
v1 to v2 change:
1. Add a description for RTD1315E.
2. Rename realtek,pdrive, realtekmndrive and realtek,dcycle.
3. Add a description for PMOS and NMOS driving strength.
4. Remove the wildcard in the compatible strings.
5. Use '-pins$' to be node name pattern.--- .../pinctrl/realtek,rtd1315e-pinctrl.yaml | 191 ++++++++++++++++++ 1 file changed, 191 insertions(+) create mode 100644
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinctrl.yamldiff --git a/Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinctrl.y aml b/Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinctrl.y aml
new file mode 100644
index 000000000000..babd87d05f32Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +26
-0+++ rl.yaml@@ -0,0 +1,191 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) # Copyright 2023 +Realtek Semiconductor Corporation %YAML 1.2 +--- +$id: +http://devicetree.org/schemas/pinctrl/realtek,rtd1315e-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Realtek DHC RTD1315E Pin Controller + +maintainers: + - TY Chang <[email protected]> + +description: + The Realtek DHC RTD1315E is a high-definition media processor SoC. +The + RTD1315E pin controller is used to control pin function, pull +up/down + resistor, drive strength, schmitt trigger and power source. + +properties: + compatible: + const: realtek,rtd1315e-pinctrl + + reg: + maxItems: 1
Quoted 8 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 31
Quoted 6 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +6
-0+ +patternProperties: + '-pins$': + if: + type: object + then:Drop the if/then. "-pins" should always be a node (object).
I will fix it in the next version.
Quoted 187 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 39
Quoted 9 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +8
-0+ allOf: + - $ref: pincfg-node.yaml# + - $ref: pinmux-node.yaml# + + properties: + pins: + items: + enum: [ gpio_0, gpio_1, emmc_rst_n, emmc_dd_sb, emmc_clk,
emmc_cmd,Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 40
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +1
-0+ gpio_6, gpio_7, gpio_8, gpio_9, gpio_10, gpio_11,
gpio_12,Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 41
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +1
-0+ gpio_13, gpio_14, gpio_15, gpio_16, gpio_17, gpio_18,
gpio_19,Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 42
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +1
-0+ gpio_20, emmc_data_0, emmc_data_1, emmc_data_2,
usb_cc2,gpio_25,Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 43
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +1
-0+ gpio_26, gpio_27, gpio_28, gpio_29, gpio_30, gpio_31,
gpio_32,Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 44
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +1
-0+ gpio_33, gpio_34, gpio_35, hif_data, hif_en, hif_rdy,
hif_clk,Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 45
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +1
-0+ gpio_dummy_40, gpio_dummy_41, gpio_dummy_42,
gpio_dummy_43,Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 46
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +1
-0+ gpio_dummy_44, gpio_dummy_45, gpio_46, gpio_47,
gpio_48,gpio_49,Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 47
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +1
-0+ gpio_50, usb_cc1, emmc_data_3, emmc_data_4, ir_rx,
ur0_rx,ur0_tx,Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 48
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +1
-0+ gpio_57, gpio_58, gpio_59, gpio_60, gpio_61, gpio_62,
gpio_dummy_63,Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 49
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +1
-0+ gpio_dummy_64, gpio_dummy_65, gpio_66, gpio_67,
gpio_68,gpio_69,Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 50
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +1
-0+ gpio_70, gpio_71, gpio_72, gpio_dummy_73,
emmc_data_5,emmc_data_6,Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 51
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +1
-0+ emmc_data_7, gpio_dummy_77, gpio_78, gpio_79,
gpio_80,gpio_81,Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 53
Quoted 2 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +2
-0+ ur2_loc, gspi_loc, hi_width, sf_en, arm_trace_dbg_en, + ejtag_aucpu_loc, ejtag_acpu_loc, ejtag_vcpu_loc,
ejtag_scpu_loc,Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 54
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +1
-0+ dmic_loc, vtc_dmic_loc, vtc_tdm_loc, vtc_i2si_loc,
tdm_ai_loc,Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 55
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +1
-0+ ai_loc, spdif_loc, hif_en_loc, scan_switch, wd_rset,
boot_sel,Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 61
Quoted 6 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +6
-0+ reset_n, testmode ] + + function: + enum: [ gpio, nf, emmc, ao, gspi_loc0, gspi_loc1, uart0, uart1, + uart2_loc0, uart2_loc1, i2c0, i2c1, i2c4, i2c5, pcie1, + etn_led, etn_phy, spi, pwm0_loc0, pwm0_loc1,
pwm1_loc0,Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 62
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +1
-0+ pwm1_loc1, pwm2_loc0, pwm2_loc1, pwm3_loc0,
pwm3_loc1,Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 66
Quoted 4 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +4
-0+ spdif_optical_loc0, spdif_optical_loc1, usb_cc1, usb_cc2, + sd, dmic_loc0, dmic_loc1, ai_loc0, ai_loc1, tdm_ai_loc0, + tdm_ai_loc1, hi_loc0, hi_m, vtc_i2so, vtc_i2si_loc0, + vtc_i2si_loc1, vtc_dmic_loc0, vtc_dmic_loc1,
vtc_tdm_loc0,Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 74
Quoted 8 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +8
-0+ vtc_tdm_loc1, dc_fan, pll_test_loc0, pll_test_loc1, + ir_rx, uart2_disable, gspi_disable, hi_width_disable, + hi_width_1bit, sf_disable, sf_enable, scpu_ejtag_loc0, + scpu_ejtag_loc1, scpu_ejtag_loc2, scpu_ejtag_loc3, + acpu_ejtag_loc0, acpu_ejtag_loc1, acpu_ejtag_loc2, + vcpu_ejtag_loc0, vcpu_ejtag_loc1, vcpu_ejtag_loc2, + aucpu_ejtag_loc0, aucpu_ejtag_loc1, aucpu_ejtag_loc2, + gpu_ejtag, iso_tristate, dbg_out0, dbg_out1,
standby_dbg,Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 75
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +1
-0+ spdif, arm_trace_debug_disable,
arm_trace_debug_enable,Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 76
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +1
-0+ aucpu_ejtag_disable, acpu_ejtag_disable,
vcpu_ejtag_disable,Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 77
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +1
-0+ scpu_ejtag_disable, vtc_dmic_loc_disable,
vtc_tdm_disable,Quoted 19 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +19
-0+ vtc_i2si_disable, tdm_ai_disable, ai_disable, spdif_disable, + hif_disable, hif_enable, test_loop, pmic_pwrup ] + + + drive-strength: + enum: [4, 8] + + bias-pull-down: true + + bias-pull-up: true + + bias-disable: true + + input-schmitt-enable: true + + input-schmitt-disable: true + + drive-push-pull: true +Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 106
Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +10
-0+ power-source: + description: | + Valid arguments are described as below: + 0: power supply of 1.8V + 1: power supply of 3.3V + enum: [0, 1] + + realtek,drive-strength-p: + description: | + Some of pins can be driven using the P-MOS and N-MOStransistor to
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 107
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +1
-0+ achieve finer adjustments. The block-diagram representation isas
Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +10
-0+ follows: + VDD + | + ||--+ + +-----o|| P-MOS-FET + | ||--+ + IN --+ +----- out + | ||--+ + +------|| N-MOS-FET + ||--+Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 127
Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +10
-0+ | + 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 drivingstrength
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 135
Quoted 8 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +8
-0+ of the P-MOS output. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 7 + + realtek,drive-strength-n: + description: | + Similar to the realtek,drive-strength-p, therealtek,drive-strength-n
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 143
Quoted 8 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +8
-0+ is used to control the driving strength of the N-MOS output. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 7 + + realtek,duty-cycle: + description: | + An integer describing the level to adjust output duty cycle,controlling
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct line 144
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +1
-0+ the proportion of positive and negative waveforms innanoseconds.
Quoted 44 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +44
-0+ 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 ] + + required: + - pins + + additionalProperties: false + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + pinctrl@4e000 { + compatible = "realtek,rtd1315e-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 = <0x2>; + realtek,drive-strength-n = <0x2>; + }; + + i2c-0-pins { + pins = "gpio_12",
Quoted 8 lines
Quoted 8 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinct new file +5
-1+ "gpio_13"; + function = "i2c0"; + drive-strength = <4>; + }; + }; --2.41.0
Thanks,
Tzuyi Chang
Re: [PATCH v2 5/7] dt-bindings: pinctrl: realtek: add RTD1315E pinctrl binding
On 29/08/2023 09:22, TY_Chang[張子逸] wrote:
...
Quoted 12 lines
Quoted 11 lines
Quoted 11 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1315e-pinctrl.yaml new file +8
-1+ + i2c-0-pins { + pins = "gpio_12", + "gpio_13"; + function = "i2c0"; + drive-strength = <4>; + }; + }; --2.41.0
Quoted 3 lines
Thanks,
Tzuyi Chang
Trim unrelevant parts of the quote, so we do not need to scroll entire message to find that you did not want to say anything more.
Best regards,
Krzysztof
RE: [PATCH v2 5/7] dt-bindings: pinctrl: realtek: add RTD1315E pinctrl binding
Hi Krzysztof,
Quoted 3 lines
Trim unrelevant parts of the quote, so we do not need to scroll entire message to find that you did not want to say anything more.
Thank you for the reminder. I'll trim it next time.
Quoted 4 lines
Best regards,
Krzysztof
Thanks,
Tzuyi Chang
PATCH v2 6/7 dt-bindings: pinctrl: realtek: add RTD1319D pinctrl binding
In reply to Tzuyi ChangAdd device tree bindings for RTD1319D.
---
v1 to v2 change:
1. Add a description for RTD1319D.
2. Rename realtek,pdrive, realtekmndrive and realtek,dcycle.
3. Add a description for PMOS and NMOS driving strength.
4. Remove the wildcard in the compatible strings.
5. Use '-pins$' to be node name pattern.
--- .../pinctrl/realtek,rtd1319d-pinctrl.yaml | 189 ++++++++++++++++++ 1 file changed, 189 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinctrl.yaml
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinctrl.yaml new file +189 -0
@@ -0,0 +1,189 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright 2023 Realtek Semiconductor Corporation +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/realtek,rtd1319d-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Realtek DHC RTD1319D Pin Controller + +maintainers: + - TY Chang <[email protected]> + +description: + The Realtek DHC RTD1319D is a high-definition media processor SoC. The + RTD1319D pin controller is used to control pin function, pull up/down + resistor, drive strength, schmitt trigger and power source. + +properties: + compatible: + const: realtek,rtd1319d-pinctrl + + reg: + maxItems: 1 + +patternProperties: + '^.*$': + if: + type: object + then: + 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, usb_cc2, gpio_25, gpio_26, gpio_27, gpio_28, + gpio_29, gpio_30, gpio_31, gpio_32, gpio_33, gpio_34, gpio_35, + hif_data, hif_en, hif_rdy, hif_clk, gpio_40, gpio_41, gpio_42, + gpio_43, gpio_44, gpio_45, gpio_46, gpio_47, gpio_48, gpio_49, + gpio_50, usb_cc1, gpio_52, gpio_53, ir_rx, ur0_rx, ur0_tx, + gpio_57, gpio_58, gpio_59, gpio_60, gpio_61, gpio_62, gpio_63, + gpio_64, emmc_rst_n, emmc_dd_sb, 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, dummy, gpio_78, gpio_79, gpio_80, + gpio_81, ur2_loc, gspi_loc, hi_width, sf_en, arm_trace_dbg_en, + ejtag_aucpu_loc, ejtag_acpu_loc, ejtag_vcpu_loc, ejtag_scpu_loc, + dmic_loc, ejtag_secpu_loc, vtc_dmic_loc, vtc_tdm_loc, vtc_i2si_loc, + tdm_ai_loc, ai_loc, spdif_loc, hif_en_loc, sc0_loc, sc1_loc, + scan_switch, wd_rset, boot_sel, reset_n, testmode ] + + function: + enum: [ gpio, nf, emmc, tp0, tp1, sc0, sc0_data0, sc0_data1, sc0_data2, + sc1, sc1_data0, sc1_data1, sc1_data2, ao, gspi_loc0, gspi_loc1, + uart0, uart1, uart2_loc0, uart2_loc1, i2c0, i2c1, i2c3, i2c4, + i2c5, pcie1, sdio, etn_led, etn_phy, spi, pwm0_loc0, pwm0_loc1, + pwm1_loc0, pwm1_loc1, pwm2_loc0, pwm2_loc1, pwm3_loc0, pwm3_loc1, + qam_agc_if0, qam_agc_if1, spdif_optical_loc0, spdif_optical_loc1, + usb_cc1, usb_cc2, vfd, sd, dmic_loc0, dmic_loc1, ai_loc0, ai_loc1, + tdm_ai_loc0, tdm_ai_loc1, hi_loc0, hi_m, vtc_i2so, vtc_i2si_loc0, + vtc_i2si_loc1, vtc_dmic_loc0, vtc_dmic_loc1, vtc_tdm_loc0, + vtc_tdm_loc1, dc_fan, pll_test_loc0, pll_test_loc1, ir_rx, + uart2_disable, gspi_disable, hi_width_disable, hi_width_1bit, + sf_disable, sf_enable, scpu_ejtag_loc0, scpu_ejtag_loc1, + scpu_ejtag_loc2, acpu_ejtag_loc0, acpu_ejtag_loc1, acpu_ejtag_loc2, + vcpu_ejtag_loc0, vcpu_ejtag_loc1, vcpu_ejtag_loc2, secpu_ejtag_loc0, + secpu_ejtag_loc1, secpu_ejtag_loc2, aucpu_ejtag_loc0, aucpu_ejtag_loc1, + aucpu_ejtag_loc2, iso_tristate, dbg_out0, dbg_out1, standby_dbg, + spdif, arm_trace_debug_disable, arm_trace_debug_enable, + aucpu_ejtag_disable, acpu_ejtag_disable, vcpu_ejtag_disable, + scpu_ejtag_disable, secpu_ejtag_disable, vtc_dmic_loc_disable, + vtc_tdm_disable, vtc_i2si_disable, tdm_ai_disable, ai_disable, + spdif_disable, hif_disable, hif_enable, test_loop, pmic_pwrup ] + + drive-strength: + enum: [4, 8] + + bias-pull-down: true + + bias-pull-up: true + + bias-disable: true + + input-schmitt-enable: true + + input-schmitt-disable: true + + 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] + + 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. + $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. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 7 + + realtek,duty-cycle: + description: | + An integer describing the level to adjust output duty cycle, controlling + the proportion of positive and negative waveforms in nanoseconds. + 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 ] + + required: + - pins + + additionalProperties: false + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + pinctrl@4e000 { + compatible = "realtek,rtd1319d-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 = <0x2>; + realtek,drive-strength-n = <0x2>; + }; + + i2c-0-pins { + pins = "gpio_12", + "gpio_13"; + function = "i2c0"; + drive-strength = <4>; + }; + };
Signature · 1 line
2.41.0
Rob Herring
maintainerRe: [PATCH v2 6/7] dt-bindings: pinctrl: realtek: add RTD1319D pinctrl binding
Quoted 37 lines · Tzuyi Chang
Add device tree bindings for RTD1319D.
Signed-off-by Tzuyi Chang <[email protected]>---
v1 to v2 change:
1. Add a description for RTD1319D.
2. Rename realtek,pdrive, realtekmndrive and realtek,dcycle.
3. Add a description for PMOS and NMOS driving strength.
4. Remove the wildcard in the compatible strings.
5. Use '-pins$' to be node name pattern.--- .../pinctrl/realtek,rtd1319d-pinctrl.yaml | 189 ++++++++++++++++++ 1 file changed, 189 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinctrl.yamlDocumentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinctrl.yaml new file +16
-0@@ -0,0 +1,189 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright 2023 Realtek Semiconductor Corporation +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/realtek,rtd1319d-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Realtek DHC RTD1319D Pin Controller + +maintainers: + - TY Chang <[email protected]> + +description: + The Realtek DHC RTD1319D is a high-definition media processor SoC. The + RTD1319D pin controller is used to control pin function, pull up/down + resistor, drive strength, schmitt trigger and power source.
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinctrl.yaml line 26
Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinctrl.yaml new file +10
-0+ +properties: + compatible: + const: realtek,rtd1319d-pinctrl + + reg: + maxItems: 1 + +patternProperties: + '^.*$':
In case it was not obvious, my comment to use '-pins' applies here and to the next patch.
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinctrl.yaml line 27
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinctrl.yaml new file +1
-0+ if:
As does dropping if/then.
Quoted 165 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinctrl.yaml new file +162
-0+ type: object + then: + 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, usb_cc2, gpio_25, gpio_26, gpio_27, gpio_28, + gpio_29, gpio_30, gpio_31, gpio_32, gpio_33, gpio_34, gpio_35, + hif_data, hif_en, hif_rdy, hif_clk, gpio_40, gpio_41, gpio_42, + gpio_43, gpio_44, gpio_45, gpio_46, gpio_47, gpio_48, gpio_49, + gpio_50, usb_cc1, gpio_52, gpio_53, ir_rx, ur0_rx, ur0_tx, + gpio_57, gpio_58, gpio_59, gpio_60, gpio_61, gpio_62, gpio_63, + gpio_64, emmc_rst_n, emmc_dd_sb, 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, dummy, gpio_78, gpio_79, gpio_80, + gpio_81, ur2_loc, gspi_loc, hi_width, sf_en, arm_trace_dbg_en, + ejtag_aucpu_loc, ejtag_acpu_loc, ejtag_vcpu_loc, ejtag_scpu_loc, + dmic_loc, ejtag_secpu_loc, vtc_dmic_loc, vtc_tdm_loc, vtc_i2si_loc, + tdm_ai_loc, ai_loc, spdif_loc, hif_en_loc, sc0_loc, sc1_loc, + scan_switch, wd_rset, boot_sel, reset_n, testmode ] + + function: + enum: [ gpio, nf, emmc, tp0, tp1, sc0, sc0_data0, sc0_data1, sc0_data2, + sc1, sc1_data0, sc1_data1, sc1_data2, ao, gspi_loc0, gspi_loc1, + uart0, uart1, uart2_loc0, uart2_loc1, i2c0, i2c1, i2c3, i2c4, + i2c5, pcie1, sdio, etn_led, etn_phy, spi, pwm0_loc0, pwm0_loc1, + pwm1_loc0, pwm1_loc1, pwm2_loc0, pwm2_loc1, pwm3_loc0, pwm3_loc1, + qam_agc_if0, qam_agc_if1, spdif_optical_loc0, spdif_optical_loc1, + usb_cc1, usb_cc2, vfd, sd, dmic_loc0, dmic_loc1, ai_loc0, ai_loc1, + tdm_ai_loc0, tdm_ai_loc1, hi_loc0, hi_m, vtc_i2so, vtc_i2si_loc0, + vtc_i2si_loc1, vtc_dmic_loc0, vtc_dmic_loc1, vtc_tdm_loc0, + vtc_tdm_loc1, dc_fan, pll_test_loc0, pll_test_loc1, ir_rx, + uart2_disable, gspi_disable, hi_width_disable, hi_width_1bit, + sf_disable, sf_enable, scpu_ejtag_loc0, scpu_ejtag_loc1, + scpu_ejtag_loc2, acpu_ejtag_loc0, acpu_ejtag_loc1, acpu_ejtag_loc2, + vcpu_ejtag_loc0, vcpu_ejtag_loc1, vcpu_ejtag_loc2, secpu_ejtag_loc0, + secpu_ejtag_loc1, secpu_ejtag_loc2, aucpu_ejtag_loc0, aucpu_ejtag_loc1, + aucpu_ejtag_loc2, iso_tristate, dbg_out0, dbg_out1, standby_dbg, + spdif, arm_trace_debug_disable, arm_trace_debug_enable, + aucpu_ejtag_disable, acpu_ejtag_disable, vcpu_ejtag_disable, + scpu_ejtag_disable, secpu_ejtag_disable, vtc_dmic_loc_disable, + vtc_tdm_disable, vtc_i2si_disable, tdm_ai_disable, ai_disable, + spdif_disable, hif_disable, hif_enable, test_loop, pmic_pwrup ] + + drive-strength: + enum: [4, 8] + + bias-pull-down: true + + bias-pull-up: true + + bias-disable: true + + input-schmitt-enable: true + + input-schmitt-disable: true + + 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] + + 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. + $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. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 7 + + realtek,duty-cycle: + description: | + An integer describing the level to adjust output duty cycle, controlling + the proportion of positive and negative waveforms in nanoseconds. + 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 ] + + required: + - pins + + additionalProperties: false + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + pinctrl@4e000 { + compatible = "realtek,rtd1319d-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 = <0x2>; + realtek,drive-strength-n = <0x2>; + }; + + i2c-0-pins { + pins = "gpio_12", + "gpio_13"; + function = "i2c0"; + drive-strength = <4>; + }; + };Signature · 1 line
2.41.0
RE: [PATCH v2 6/7] dt-bindings: pinctrl: realtek: add RTD1319D pinctrl binding
Hi Rob,
Quoted 61 lines · Tzuyi Chang
Quoted 46 lines
Add device tree bindings for RTD1319D.
Signed-off-by Tzuyi Chang <[email protected]>---
v1 to v2 change:
1. Add a description for RTD1319D.
2. Rename realtek,pdrive, realtekmndrive and realtek,dcycle.
3. Add a description for PMOS and NMOS driving strength.
4. Remove the wildcard in the compatible strings.
5. Use '-pins$' to be node name pattern.--- .../pinctrl/realtek,rtd1319d-pinctrl.yaml | 189 ++++++++++++++++++ 1 file changed, 189 insertions(+) create mode 100644
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinctrl.yamldiff --git a/Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinctrl.y aml b/Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinctrl.y aml
new file mode 100644
index 000000000000..8653d42ac1f3Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +19
-0+++ rl.yaml@@ -0,0 +1,189 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) # Copyright 2023 +Realtek Semiconductor Corporation %YAML 1.2 +--- +$id: +http://devicetree.org/schemas/pinctrl/realtek,rtd1319d-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Realtek DHC RTD1319D Pin Controller + +maintainers: + - TY Chang <[email protected]> + +description: + The Realtek DHC RTD1319D is a high-definition media processor SoC. +The + RTD1319D pin controller is used to control pin function, pull +up/down + resistor, drive strength, schmitt trigger and power source.Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 28
Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +10
-0+ +properties: + compatible: + const: realtek,rtd1319d-pinctrl + + reg: + maxItems: 1 + +patternProperties: + '^.*$':In case it was not obvious, my comment to use '-pins' applies here and to the next patch.
Quoted 4 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 29
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ if:As does dropping if/then.
I will fix it in the next version.
Quoted 198 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 39
Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +10
-0+ type: object + then: + 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,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 40
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ gpio_8, gpio_9, gpio_10, gpio_11, gpio_12, gpio_13,
gpio_14,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 41
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ gpio_15, gpio_16, gpio_17, gpio_18, gpio_19, gpio_20,
gpio_21,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 42
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ gpio_22, gpio_23, usb_cc2, gpio_25, gpio_26, gpio_27,
gpio_28,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 43
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ gpio_29, gpio_30, gpio_31, gpio_32, gpio_33, gpio_34,
gpio_35,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 44
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ hif_data, hif_en, hif_rdy, hif_clk, gpio_40, gpio_41,
gpio_42,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 45
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ gpio_43, gpio_44, gpio_45, gpio_46, gpio_47, gpio_48,
gpio_49,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 46
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ gpio_50, usb_cc1, gpio_52, gpio_53, ir_rx, ur0_rx,
ur0_tx,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 47
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ gpio_57, gpio_58, gpio_59, gpio_60, gpio_61, gpio_62,
gpio_63,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 48
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ gpio_64, emmc_rst_n, emmc_dd_sb, emmc_clk,
emmc_cmd,emmc_data_0,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 49
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ emmc_data_1, emmc_data_2, emmc_data_3,
emmc_data_4,emmc_data_5,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 50
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ emmc_data_6, emmc_data_7, dummy, gpio_78,
gpio_79,gpio_80,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 51
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ gpio_81, ur2_loc, gspi_loc, hi_width, sf_en,
arm_trace_dbg_en,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 52
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ ejtag_aucpu_loc, ejtag_acpu_loc, ejtag_vcpu_loc,
ejtag_scpu_loc,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 53
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ dmic_loc, ejtag_secpu_loc, vtc_dmic_loc, vtc_tdm_loc,
vtc_i2si_loc,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 54
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ tdm_ai_loc, ai_loc, spdif_loc, hif_en_loc, sc0_loc,
sc1_loc,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 59
Quoted 5 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +5
-0+ scan_switch, wd_rset, boot_sel, reset_n, testmode + ] + + function: + enum: [ gpio, nf, emmc, tp0, tp1, sc0, sc0_data0, sc0_data1,
sc0_data2,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 60
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ sc1, sc1_data0, sc1_data1, sc1_data2, ao, gspi_loc0,
gspi_loc1,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 62
Quoted 2 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +2
-0+ uart0, uart1, uart2_loc0, uart2_loc1, i2c0, i2c1, i2c3, i2c4, + i2c5, pcie1, sdio, etn_led, etn_phy, spi, pwm0_loc0,
pwm0_loc1,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 63
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ pwm1_loc0, pwm1_loc1, pwm2_loc0, pwm2_loc1,
pwm3_loc0,pwm3_loc1,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 64
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ qam_agc_if0, qam_agc_if1, spdif_optical_loc0,
spdif_optical_loc1,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 65
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ usb_cc1, usb_cc2, vfd, sd, dmic_loc0, dmic_loc1, ai_loc0,
ai_loc1,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 66
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ tdm_ai_loc0, tdm_ai_loc1, hi_loc0, hi_m, vtc_i2so,
vtc_i2si_loc0,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 67
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ vtc_i2si_loc1, vtc_dmic_loc0, vtc_dmic_loc1,
vtc_tdm_loc0,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 69
Quoted 2 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +2
-0+ vtc_tdm_loc1, dc_fan, pll_test_loc0, pll_test_loc1, ir_rx, + uart2_disable, gspi_disable, hi_width_disable,
hi_width_1bit,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 71
Quoted 2 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +2
-0+ sf_disable, sf_enable, scpu_ejtag_loc0, scpu_ejtag_loc1, + scpu_ejtag_loc2, acpu_ejtag_loc0, acpu_ejtag_loc1,
acpu_ejtag_loc2,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 72
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ vcpu_ejtag_loc0, vcpu_ejtag_loc1, vcpu_ejtag_loc2,
secpu_ejtag_loc0,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 73
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ secpu_ejtag_loc1, secpu_ejtag_loc2, aucpu_ejtag_loc0,
aucpu_ejtag_loc1,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 74
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ aucpu_ejtag_loc2, iso_tristate, dbg_out0, dbg_out1,
standby_dbg,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 75
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ spdif, arm_trace_debug_disable,
arm_trace_debug_enable,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 76
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ aucpu_ejtag_disable, acpu_ejtag_disable,
vcpu_ejtag_disable,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 77
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ scpu_ejtag_disable, secpu_ejtag_disable,
vtc_dmic_loc_disable,Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 78
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ vtc_tdm_disable, vtc_i2si_disable, tdm_ai_disable,
ai_disable,Quoted 18 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +18
-0+ spdif_disable, hif_disable, hif_enable, test_loop, + pmic_pwrup ] + + drive-strength: + enum: [4, 8] + + bias-pull-down: true + + bias-pull-up: true + + bias-disable: true + + input-schmitt-enable: true + + input-schmitt-disable: true + + drive-push-pull: true +Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 106
Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +10
-0+ power-source: + description: | + Valid arguments are described as below: + 0: power supply of 1.8V + 1: power supply of 3.3V + enum: [0, 1] + + realtek,drive-strength-p: + description: | + Some of pins can be driven using the P-MOS and N-MOStransistor to
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 107
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ achieve finer adjustments. The block-diagram representation isas
Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +10
-0+ follows: + VDD + | + ||--+ + +-----o|| P-MOS-FET + | ||--+ + IN --+ +----- out + | ||--+ + +------|| N-MOS-FET + ||--+Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 127
Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +10
-0+ | + 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 drivingstrength
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 135
Quoted 8 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +8
-0+ of the P-MOS output. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 7 + + realtek,drive-strength-n: + description: | + Similar to the realtek,drive-strength-p, therealtek,drive-strength-n
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 143
Quoted 8 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +8
-0+ is used to control the driving strength of the N-MOS output. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 7 + + realtek,duty-cycle: + description: | + An integer describing the level to adjust output duty cycle,controlling
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct line 144
Quoted 1 line
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +1
-0+ the proportion of positive and negative waveforms innanoseconds.
Quoted 44 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +44
-0+ 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 ] + + required: + - pins + + additionalProperties: false + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + pinctrl@4e000 { + compatible = "realtek,rtd1319d-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 = <0x2>; + realtek,drive-strength-n = <0x2>; + }; + + i2c-0-pins { + pins = "gpio_12",
Quoted 8 lines
Quoted 8 lines
Documentation/devicetree/bindings/pinctrl/realtek,rtd1319d-pinct new file +5
-1+ "gpio_13"; + function = "i2c0"; + drive-strength = <4>; + }; + }; --2.41.0
Thanks,
Tzuyi Chang
Re: [PATCH v2 6/7] dt-bindings: pinctrl: realtek: add RTD1319D pinctrl binding
In reply to Tzuyi ChangQuoted 5 lines · Tzuyi Chang
Add device tree bindings for RTD1319D.
Signed-off-by Tzuyi Chang <[email protected]>---
v1 to v2 change:
My comments are addressed so:
(Then you need to also fix Rob's comments.)
Yours,
Linus Walleij
PATCH v2 7/7 dt-bindings: pinctrl: realtek: add RTD1619B pinctrl binding
In reply to Tzuyi ChangAdd device tree bindings for RTD1619B.
---
v1 to v2 change:
1. Add a description for RTD1619B.
2. Rename realtek,pdrive, realtekmndrive and realtek,dcycle.
3. Add a description for PMOS and NMOS driving strength.
4. Remove the wildcard in the compatible strings.
5. Use '-pins$' to be node name pattern.
--- .../pinctrl/realtek,rtd1619b-pinctrl.yaml | 188 ++++++++++++++++++ 1 file changed, 188 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/realtek,rtd1619b-pinctrl.yaml
Documentation/devicetree/bindings/pinctrl/realtek,rtd1619b-pinctrl.yaml new file +188 -0
@@ -0,0 +1,188 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright 2023 Realtek Semiconductor Corporation +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/realtek,rtd1619b-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Realtek DHC RTD1619B Pin Controller + +maintainers: + - TY Chang <[email protected]> + +description: + The Realtek DHC RTD1619B is a high-definition media processor SoC. The + RTD1619B pin controller is used to control pin function, pull up/down + resistor, drive strength, schmitt trigger and power source. + +properties: + compatible: + const: realtek,rtd1619b-pinctrl + + reg: + maxItems: 1 + +patternProperties: + '^.*$': + if: + type: object + then: + 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, usb_cc2, gpio_25, gpio_26, gpio_27, gpio_28, + gpio_29, gpio_30, gpio_31, gpio_32, gpio_33, gpio_34, gpio_35, + hif_data, hif_en, hif_rdy, hif_clk, gpio_40, gpio_41, gpio_42, + gpio_43, gpio_44, gpio_45, gpio_46, gpio_47, gpio_48, gpio_49, + gpio_50, usb_cc1, gpio_52, gpio_53, ir_rx, ur0_rx, ur0_tx, + gpio_57, gpio_58, gpio_59, gpio_60, gpio_61, gpio_62, gpio_63, + gpio_64, gpio_65, gpio_66, gpio_67, gpio_68, gpio_69, gpio_70, + gpio_71, gpio_72, gpio_73, gpio_74, gpio_75, gpio_76, emmc_cmd, + spi_ce_n, spi_sck, spi_so, spi_si, emmc_rst_n, emmc_dd_sb, + emmc_clk, emmc_data_0, emmc_data_1, emmc_data_2, emmc_data_3, + emmc_data_4, emmc_data_5, emmc_data_6, emmc_data_7, ur2_loc, + gspi_loc, sdio_loc, hi_loc, hi_width, sf_en, arm_trace_dbg_en, + pwm_01_open_drain_en_loc0, pwm_23_open_drain_en_loc0, + pwm_01_open_drain_en_loc1, pwm_23_open_drain_en_loc1, + ejtag_acpu_loc, ejtag_vcpu_loc, ejtag_scpu_loc, dmic_loc, + iso_gspi_loc, ejtag_ve3_loc, ejtag_aucpu0_loc, ejtag_aucpu1_loc ] + + function: + enum: [ gpio, nf, nf_spi, spi, pmic, spdif, spdif_coaxial, spdif_optical_loc0, + spdif_optical_loc1, emmc_spi, emmc, sc1, uart0, uart1, uart2_loc0, uart2_loc1, + gspi_loc1, iso_gspi_loc1, i2c0, i2c1, i2c3, i2c4, i2c5, pwm0, pwm1, pwm2, + pwm3, etn_led, etn_phy, etn_clk, sc0, vfd, gspi_loc0, iso_gspi_loc0, pcie1, + pcie2, sd, sdio_loc0, sdio_loc1, hi, hi_m, dc_fan, pll_test_loc0, pll_test_loc1, + usb_cc1, usb_cc2, ir_rx, tdm_ai_loc0, tdm_ai_loc1, dmic_loc0, dmic_loc1, + ai_loc0, ai_loc1, tp0, tp1, ao, uart2_disable, gspi_disable, sdio_disable, + hi_loc_disable, hi_loc0, hi_width_disable, hi_width_1bit, vtc_i2si_loc0, + vtc_tdm_loc0, vtc_dmic_loc0, vtc_i2si_loc1, vtc_tdm_loc1, vtc_dmic_loc1, + vtc_i2so, ve3_ejtag_loc0, aucpu0_ejtag_loc0, aucpu1_ejtag_loc0, ve3_ejtag_loc1, + aucpu0_ejtag_loc1, aucpu1_ejtag_loc1, ve3_ejtag_loc2, aucpu0_ejtag_loc2, + aucpu1_ejtag_loc2, scpu_ejtag_loc0, acpu_ejtag_loc0, vcpu_ejtag_loc0, + scpu_ejtag_loc1, acpu_ejtag_loc1, vcpu_ejtag_loc1, scpu_ejtag_loc2, + acpu_ejtag_loc2, vcpu_ejtag_loc2, ve3_ejtag_disable, aucpu0_ejtag_disable, + aucpu1_ejtag_disable, acpu_ejtag_disable, vcpu_ejtag_disable, + scpu_ejtag_disable, iso_gspi_disable, sf_disable, sf_enable, + arm_trace_debug_disable, arm_trace_debug_enable, pwm_normal, pwm_open_drain, + standby_dbg, test_loop_dis ] + + drive-strength: + enum: [4, 8] + + bias-pull-down: true + + bias-pull-up: true + + bias-disable: true + + input-schmitt-enable: true + + input-schmitt-disable: true + + 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] + + 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. + $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. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 7 + + realtek,duty-cycle: + description: | + An integer describing the level to adjust output duty cycle, controlling + the proportion of positive and negative waveforms in nanoseconds. + 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 ] + + required: + - pins + + additionalProperties: false + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + pinctrl@4e000 { + compatible = "realtek,rtd1619b-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 = <0x2>; + realtek,drive-strength-n = <0x2>; + }; + + i2c-0-pins { + pins = "gpio_12", + "gpio_13"; + function = "i2c0"; + drive-strength = <4>; + }; + };
Signature · 1 line
2.41.0
Re: [PATCH v2 7/7] dt-bindings: pinctrl: realtek: add RTD1619B pinctrl binding
Quoted 3 lines · Tzuyi Chang
Add device tree bindings for RTD1619B.
Signed-off-by Tzuyi Chang <[email protected]>
Yours,
Linus Walleij