Add basic pinctrl drivers for JHB100 SoC
Subsystems (5)
v8 cover Add basic pinctrl drivers for JHB100 SoC
The JHB100 SoC has 13 pinctrl domains - sys0, sys0h, sys1, sys2, per0, per1, per2, per2pok, per3, adc0, adc1, emmc, and vga.
In the current series, we will only add the following pinctrl:
- sys0, sys0h, sys1, sys2
- per0, per1, per2, per2pok, per3
The remaining pinctrl will be implemented in future series.
This series depends on the series:
https://lore.kernel.org/all/[email protected]/
Change since v7:
Add a new patch 21.
PATCH 3/5/7/9/11/13/15/17/19:
- Delete the file starfive,jhb100-pinctrl.h in the binding directory.
PATCH 4/6/8/9/10/12/14/16/18/20:
- Add definitions specific to .c files
v7: https://lore.kernel.org/all/[email protected]/
v6: https://lore.kernel.org/all/[email protected]/
v5: https://lore.kernel.org/all/[email protected]/
v4: https://lore.kernel.org/all/[email protected]/
v3: https://lore.kernel.org/all/[email protected]/
v2: https://lore.kernel.org/all/[email protected]/
v1: https://lore.kernel.org/all/[email protected]/
Changhuang Liang (22):
dt-bindings: pincfg-node: Add property 'input-debounce-ns'
pinctrl: pinconf-generic: Add property 'input-debounce-ns'
dt-bindings: pinctrl: Add starfive,jhb100-sys0-pinctrl
pinctrl: starfive: Add StarFive JHB100 sys0 controller driver
dt-bindings: pinctrl: Add starfive,jhb100-sys0h-pinctrl
pinctrl: starfive: Add StarFive JHB100 sys0h controller driver
dt-bindings: pinctrl: Add starfive,jhb100-sys1-pinctrl
pinctrl: starfive: Add StarFive JHB100 sys1 controller driver
dt-bindings: pinctrl: Add starfive,jhb100-sys2-pinctrl
pinctrl: starfive: Add StarFive JHB100 sys2 controller driver
dt-bindings: pinctrl: Add starfive,jhb100-per0-pinctrl
pinctrl: starfive: Add StarFive JHB100 per0 controller driver
dt-bindings: pinctrl: Add starfive,jhb100-per1-pinctrl
pinctrl: starfive: Add StarFive JHB100 per1 controller driver
dt-bindings: pinctrl: Add starfive,jhb100-per2-pinctrl
pinctrl: starfive: Add StarFive JHB100 per2 controller driver
dt-bindings: pinctrl: Add starfive,jhb100-per2pok-pinctrl
pinctrl: starfive: Add StarFive JHB100 per2pok controller driver
dt-bindings: pinctrl: Add starfive,jhb100-per3-pinctrl
pinctrl: starfive: Add StarFive JHB100 per3 controller driver
riscv: dts: starfive: Add JHB100 pinctrl pad number header
riscv: dts: starfive: jhb100: Add pinctrl nodes
.../bindings/pinctrl/pincfg-node.yaml | 11 + .../pinctrl/starfive,jhb100-per0-pinctrl.yaml | 179 ++ .../pinctrl/starfive,jhb100-per1-pinctrl.yaml | 178 ++ .../pinctrl/starfive,jhb100-per2-pinctrl.yaml | 168 ++ .../starfive,jhb100-per2pok-pinctrl.yaml | 162 ++ .../pinctrl/starfive,jhb100-per3-pinctrl.yaml | 166 ++ .../pinctrl/starfive,jhb100-sys0-pinctrl.yaml | 164 ++ .../starfive,jhb100-sys0h-pinctrl.yaml | 162 ++ .../pinctrl/starfive,jhb100-sys1-pinctrl.yaml | 164 ++ .../pinctrl/starfive,jhb100-sys2-pinctrl.yaml | 165 ++ MAINTAINERS | 9 + arch/riscv/boot/dts/starfive/jhb100-evb1.dts | 3 + .../boot/dts/starfive/jhb100-pinctrl.dtsi | 23 + arch/riscv/boot/dts/starfive/jhb100.dtsi | 107 ++ .../dts/starfive/starfive,jhb100-pinctrl.h | 247 +++ drivers/pinctrl/pinconf-generic.c | 2 + drivers/pinctrl/starfive/Kconfig | 107 ++ drivers/pinctrl/starfive/Makefile | 11 + .../starfive/pinctrl-starfive-jhb100-per0.c | 182 +++ .../starfive/pinctrl-starfive-jhb100-per1.c | 193 +++ .../starfive/pinctrl-starfive-jhb100-per2.c | 136 ++ .../pinctrl-starfive-jhb100-per2pok.c | 99 ++ .../starfive/pinctrl-starfive-jhb100-per3.c | 129 ++ .../starfive/pinctrl-starfive-jhb100-sys0.c | 121 ++ .../starfive/pinctrl-starfive-jhb100-sys0h.c | 99 ++ .../starfive/pinctrl-starfive-jhb100-sys1.c | 94 ++ .../starfive/pinctrl-starfive-jhb100-sys2.c | 140 ++ .../starfive/pinctrl-starfive-jhb100.c | 1446 +++++++++++++++++ .../starfive/pinctrl-starfive-jhb100.h | 153 ++ include/linux/pinctrl/pinconf-generic.h | 5 + 30 files changed, 4825 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/starfive,jhb100-per0-pinctrl.yaml create mode 100644 Documentation/devicetree/bindings/pinctrl/starfive,jhb100-per1-pinctrl.yaml create mode 100644 Documentation/devicetree/bindings/pinctrl/starfive,jhb100-per2-pinctrl.yaml create mode 100644 Documentation/devicetree/bindings/pinctrl/starfive,jhb100-per2pok-pinctrl.yaml create mode 100644 Documentation/devicetree/bindings/pinctrl/starfive,jhb100-per3-pinctrl.yaml create mode 100644 Documentation/devicetree/bindings/pinctrl/starfive,jhb100-sys0-pinctrl.yaml create mode 100644 Documentation/devicetree/bindings/pinctrl/starfive,jhb100-sys0h-pinctrl.yaml create mode 100644 Documentation/devicetree/bindings/pinctrl/starfive,jhb100-sys1-pinctrl.yaml create mode 100644 Documentation/devicetree/bindings/pinctrl/starfive,jhb100-sys2-pinctrl.yaml create mode 100644 arch/riscv/boot/dts/starfive/jhb100-pinctrl.dtsi create mode 100644 arch/riscv/boot/dts/starfive/starfive,jhb100-pinctrl.h create mode 100644 drivers/pinctrl/starfive/pinctrl-starfive-jhb100-per0.c create mode 100644 drivers/pinctrl/starfive/pinctrl-starfive-jhb100-per1.c create mode 100644 drivers/pinctrl/starfive/pinctrl-starfive-jhb100-per2.c create mode 100644 drivers/pinctrl/starfive/pinctrl-starfive-jhb100-per2pok.c create mode 100644 drivers/pinctrl/starfive/pinctrl-starfive-jhb100-per3.c create mode 100644 drivers/pinctrl/starfive/pinctrl-starfive-jhb100-sys0.c create mode 100644 drivers/pinctrl/starfive/pinctrl-starfive-jhb100-sys0h.c create mode 100644 drivers/pinctrl/starfive/pinctrl-starfive-jhb100-sys1.c create mode 100644 drivers/pinctrl/starfive/pinctrl-starfive-jhb100-sys2.c create mode 100644 drivers/pinctrl/starfive/pinctrl-starfive-jhb100.c create mode 100644 drivers/pinctrl/starfive/pinctrl-starfive-jhb100.h
--
2.25.1
PATCH v8 1/22 dt-bindings: pincfg-node: Add property 'input-debounce-ns'
The StarFive JHB100 SoC hardware supports debounce time configuration with nanosecond granularity. The existing 'input-debounce' property uses microseconds, which is insufficient to accurately represent the hardware's finer timing steps.
Add the property 'input-debounce-ns' to specify debounce time in nanoseconds as an alternative to the existing 'input-debounce' which uses microseconds. Make the new property unavailable when the existing property 'input-debounce' is selected to prevent conflicting definitions.
--- .../devicetree/bindings/pinctrl/pincfg-node.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+)
Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml +11 -0
@@ -104,6 +104,10 @@ properties: description: Takes the debounce time in usec as argument or 0 to disable debouncing + input-debounce-ns: + description: Takes the debounce time in nsec as argument or 0 to disable + debouncing + power-source: $ref: /schemas/types.yaml#/definitions/uint32 description: select between different power supplies
@@ -214,6 +218,13 @@ allOf: input-schmitt-enable: false input-schmitt-microvolt: false + - if: + required: + - input-debounce + then: + properties: + input-debounce-ns: false + - if: required: - drive-strength
Signature · 1 line
2.25.1
PATCH v8 2/22 pinctrl: pinconf-generic: Add property 'input-debounce-ns'
In reply to Changhuang LiangAdd 'input-debounce-ns' to the generic parameters used for parsing DT files, along with the corresponding configuration parameter PIN_CONFIG_INPUT_DEBOUNCE_NS. This allows debounce time to be specified in nanoseconds as an alternative to the existing 'input-debounce' property which uses microseconds
--- drivers/pinctrl/pinconf-generic.c | 2 ++ include/linux/pinctrl/pinconf-generic.h | 5 +++++ 2 files changed, 7 insertions(+)
drivers/pinctrl/pinconf-generic.c +2 -0
@@ -43,6 +43,7 @@ static const struct pin_config_item conf_items[] = {PCONFDUMP (PIN_CONFIG_DRIVE_STRENGTH ,"output drive strength" ,"mA" , true),PCONFDUMP (PIN_CONFIG_DRIVE_STRENGTH_UA ,"output drive strength" ,"uA" , true),PCONFDUMP (PIN_CONFIG_INPUT_DEBOUNCE ,"input debounce" ,"usec" , true), +PCONFDUMP (PIN_CONFIG_INPUT_DEBOUNCE_NS ,"input debounce" ,"nsec" , true),PCONFDUMP (PIN_CONFIG_INPUT_ENABLE ,"input enabled" ,NULL , false),PCONFDUMP (PIN_CONFIG_INPUT_SCHMITT ,"input schmitt trigger" ,NULL , false), PCONFDUMP(PIN_CONFIG_INPUT_SCHMITT_UV, "input schmitt threshold", "uV", true),
@@ -185,6 +186,7 @@ static const struct pinconf_generic_params dt_params[] = { { "drive-strength", PIN_CONFIG_DRIVE_STRENGTH, 0 }, { "drive-strength-microamp", PIN_CONFIG_DRIVE_STRENGTH_UA, 0 }, { "input-debounce", PIN_CONFIG_INPUT_DEBOUNCE, 0 }, + { "input-debounce-ns", PIN_CONFIG_INPUT_DEBOUNCE_NS, 0 }, { "input-disable", PIN_CONFIG_INPUT_ENABLE, 0 }, { "input-enable", PIN_CONFIG_INPUT_ENABLE, 1 }, { "input-schmitt", PIN_CONFIG_INPUT_SCHMITT, 0 },
include/linux/pinctrl/pinconf-generic.h +5 -0
@@ -71,6 +71,10 @@ struct pinctrl_map;* which means it will wait for signals to settle when reading inputs. The * argument gives the debounce time in usecs. Setting the * argument to zero turns debouncing off. +* @PIN_CONFIG_INPUT_DEBOUNCE_NS: this will configure the pin to debounce mode, +* which means it will wait for signals to settle when reading inputs. The +* argument gives the debounce time in nsecs. Setting the +* argument to zero turns debouncing off. * @PIN_CONFIG_INPUT_ENABLE: enable the pin's input. Note that this does not * affect the pin's ability to drive output. 1 enables input, 0 disables * input.
@@ -143,6 +147,7 @@ enum pin_config_param {PIN_CONFIG_DRIVE_STRENGTH ,PIN_CONFIG_DRIVE_STRENGTH_UA ,PIN_CONFIG_INPUT_DEBOUNCE , +PIN_CONFIG_INPUT_DEBOUNCE_NS ,PIN_CONFIG_INPUT_ENABLE ,PIN_CONFIG_INPUT_SCHMITT , PIN_CONFIG_INPUT_SCHMITT_ENABLE,
Signature · 1 line
2.25.1
PATCH v8 3/22 dt-bindings: pinctrl: Add starfive,jhb100-sys0-pinctrl
In reply to Changhuang LiangAdd pinctrl bindings for StarFive JHB100 SoC System-0(sys0) pinctrl controller.
--- .../pinctrl/starfive,jhb100-sys0-pinctrl.yaml | 164 ++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/starfive,jhb100-sys0-pinctrl.yaml
Documentation/devicetree/bindings/pinctrl/starfive,jhb100-sys0-pinctrl.yaml new file +164 -0
@@ -0,0 +1,164 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/starfive,jhb100-sys0-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: StarFive JHB100 System-0 Pin Controller + +description: | + Pinctrl bindings for JHB100 RISC-V SoC from StarFive Technology Ltd. + + The JHB100 SoC has 13 pinctrl domains - sys0, sys0h, sys1, sys2, per0, per1, + per2, per2pok, per3, adc0, adc1, emmc, and vga. + This document provides an overview of the "sys0" pinctrl domain. + + The "sys0" domain has a pin controller which provides + - function selection for GPIO pads. + - GPIO pad configuration. + - GPIO interrupt handling. + + In the SYS0 Pin Controller, there are 4 multi-function GPIO_PADs. Each of + them can be multiplexed to different hardware blocks through function + selection and each iopad has a maximum of up to 2 functions - 0 and 1. + Function 0 is the default function which is generally the GPIO function + (or occasionally, it can be a peripheral signal). + Function 1 is the alternate function or peripheral signal that can be + routed to the iopad. The function selection is carried out by writing + the function number to the iopad function select register. + + Each iopad is configurable with parameters such as input-enable, internal + pull-up/pull-down bias, drive strength, schmitt trigger, slew rate, input + debounce nanoseconds. + +maintainers: + - Changhuang Liang <[email protected]> + +properties: + compatible: + items: + - const: starfive,jhb100-sys0-pinctrl + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + + interrupts: + maxItems: 1 + + interrupt-controller: true + + '#interrupt-cells': + const: 2 + + gpio-controller: true + + '#gpio-cells': + const: 2 + + gpio-ranges: true + + gpio-line-names: true + +patternProperties: + '-grp$': + type: object + additionalProperties: false + patternProperties: + '-pins$': + type: object + description: | + A pinctrl node should contain at least one subnode representing the + pinctrl groups available in the domain. Each subnode will list the + pins it needs, and how they should be configured, with regard to + function selection, bias, input enable/disable, input schmitt + trigger enable/disable, slew-rate, input debounce and + drive-strength. + allOf: + - $ref: /schemas/pinctrl/pincfg-node.yaml + - $ref: /schemas/pinctrl/pinmux-node.yaml + additionalProperties: false + + properties: + pins: + description: + The list of IOs that properties in the pincfg node apply to. + + function: + description: + A string containing the name of the function to mux for these + pins. + enum: [ auxpwrgood, gpio, hbled, pe2rst_out ] + + bias-disable: true + + bias-pull-down: + type: boolean + + bias-pull-up: + type: boolean + + drive-strength: + enum: [ 2, 4, 8, 12 ] + + drive-strength-microamp: + enum: [ 2000, 4000, 8000, 12000 ] + + input-debounce-ns: + minimum: 0 + maximum: 10485680 + description: + Debounce time in nanoseconds. The hardware counts in 80 ns + stages with a 17-bit counter, so the maximum is 10485680 ns. + + input-disable: true + + input-enable: true + + input-schmitt-enable: true + + input-schmitt-disable: true + + slew-rate: + enum: [ 0, 1 ] + default: 0 + description: | + 0: slow + 1: fast + +required: + - compatible + - reg + - resets + - interrupts + - interrupt-controller + - '#interrupt-cells' + - gpio-controller + - '#gpio-cells' + - gpio-ranges + +additionalProperties: false + +examples: + - | + soc { + #address-cells = <2>; + #size-cells = <2>; + + pinctrl_sys0: pinctrl@13080000 { + compatible = "starfive,jhb100-sys0-pinctrl"; + reg = <0x0 0x13080000 0x0 0x800>; + resets = <&sys0crg 2>; + interrupts = <56>; + interrupt-controller; + #interrupt-cells = <2>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pinctrl_sys0 0 0 4>; + }; + };
Signature · 1 line
2.25.1
Re: [PATCH v8 03/22] dt-bindings: pinctrl: Add starfive,jhb100-sys0-pinctrl
Quoted 9 lines · Changhuang Liang
Add pinctrl bindings for StarFive JHB100 SoC System-0(sys0) pinctrl controller.
Signed-off-by Changhuang Liang <[email protected]>--- .../pinctrl/starfive,jhb100-sys0-pinctrl.yaml | 164 ++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/starfive,jhb100-sys0-pinctrl.yaml
PATCH v8 4/22 pinctrl: starfive: Add StarFive JHB100 sys0 controller driver
In reply to Changhuang LiangAdd pinctrl driver for StarFive JHB100 SoC System-0(sys0) pinctrl controller.
Simultaneously add a generic pinctrl driver framework for registering the pinctrl of other domains (sys1, sys2, and so on) in the JHB100 SoC.
--- MAINTAINERS | 8 + drivers/pinctrl/starfive/Kconfig | 19 + drivers/pinctrl/starfive/Makefile | 3 + .../starfive/pinctrl-starfive-jhb100-sys0.c | 121 ++ .../starfive/pinctrl-starfive-jhb100.c | 1446 +++++++++++++++++ .../starfive/pinctrl-starfive-jhb100.h | 153 ++ 6 files changed, 1750 insertions(+) create mode 100644 drivers/pinctrl/starfive/pinctrl-starfive-jhb100-sys0.c create mode 100644 drivers/pinctrl/starfive/pinctrl-starfive-jhb100.c create mode 100644 drivers/pinctrl/starfive/pinctrl-starfive-jhb100.h
MAINTAINERS +8 -0
@@ -25910,6 +25910,14 @@ S: Supported F: Documentation/devicetree/bindings/interrupt-controller/starfive,jhb100-intc.yaml F: drivers/irqchip/irq-starfive-jhb100-intc.c +STARFIVE JHB100 PINCTRL DRIVERS +M: Changhuang Liang <[email protected]> +M: Lianfeng Ouyang <[email protected]> +L: [email protected] +S: Maintained +F: Documentation/devicetree/bindings/pinctrl/starfive,jhb1*.yaml +F: drivers/pinctrl/starfive/pinctrl-starfive-jhb1* + STARFIVE JHB100 RESET CONTROLLER DRIVERS M: Changhuang Liang <[email protected]> S: Maintained
drivers/pinctrl/starfive/Kconfig +19 -0
@@ -47,3 +47,22 @@ config PINCTRL_STARFIVE_JH7110_AON This also provides an interface to the GPIO pins not used by other peripherals supporting inputs, outputs, configuring pull-up/pull-down and interrupts on input changes. + +config PINCTRL_STARFIVE_JHB100 + bool + depends on OF + select GENERIC_PINCTRL + select GPIOLIB + select GPIOLIB_IRQCHIP + select OF_GPIO + +config PINCTRL_STARFIVE_JHB100_SYS0 + tristate "StarFive JHB100 SoC System-0 pinctrl and GPIO driver" + depends on ARCH_STARFIVE || COMPILE_TEST + select PINCTRL_STARFIVE_JHB100 + default ARCH_STARFIVE + help + Say yes here to support system-0 pin control on the StarFive JHB100 SoC. + This also provides an interface to the GPIO pins not used by other + peripherals supporting inputs, outputs, configuring pull-up/pull-down + and interrupts on input changes.
drivers/pinctrl/starfive/Makefile +3 -0
@@ -5,3 +5,6 @@ obj-$(CONFIG_PINCTRL_STARFIVE_JH7100) += pinctrl-starfive-jh7100.o obj-$(CONFIG_PINCTRL_STARFIVE_JH7110) += pinctrl-starfive-jh7110.o obj-$(CONFIG_PINCTRL_STARFIVE_JH7110_SYS) += pinctrl-starfive-jh7110-sys.o obj-$(CONFIG_PINCTRL_STARFIVE_JH7110_AON) += pinctrl-starfive-jh7110-aon.o + +obj-$(CONFIG_PINCTRL_STARFIVE_JHB100) += pinctrl-starfive-jhb100.o +obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_SYS0) += pinctrl-starfive-jhb100-sys0.o
drivers/pinctrl/starfive/pinctrl-starfive-jhb100-sys0.c new file +121 -0
121 lines not on this page · raw message
drivers/pinctrl/starfive/pinctrl-starfive-jhb100.c new file +1446 -0
1,446 lines not on this page · raw message
drivers/pinctrl/starfive/pinctrl-starfive-jhb100.h new file +153 -0
153 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v8 5/22 dt-bindings: pinctrl: Add starfive,jhb100-sys0h-pinctrl
In reply to Changhuang LiangAdd pinctrl bindings for StarFive JHB100 SoC System-0 host(sys0h) pinctrl controller.
--- .../starfive,jhb100-sys0h-pinctrl.yaml | 162 ++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/starfive,jhb100-sys0h-pinctrl.yaml
Documentation/devicetree/bindings/pinctrl/starfive,jhb100-sys0h-pinctrl.yaml new file +162 -0
@@ -0,0 +1,162 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/starfive,jhb100-sys0h-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: StarFive JHB100 System-0 Host Pin Controller + +description: | + Pinctrl bindings for JHB100 RISC-V SoC from StarFive Technology Ltd. + + The JHB100 SoC has 13 pinctrl domains - sys0, sys0h, sys1, sys2, per0, per1, + per2, per2pok, per3, adc0, adc1, emmc, and vga. + This document provides an overview of the "sys0h" pinctrl domain. + + The "sys0h" domain has a pin controller which provides + - function selection for GPIO pads. + - GPIO pad configuration. + - GPIO interrupt handling. + + In the SYS0H Pin Controller, there are 12 multi-function GPIO_PADs. Each of + them can be multiplexed to different hardware blocks through function + selection. Each iopad has a maximum of up to 4 functions - 0, 1, 2, and 3. + Function 0 is the default function which is generally the GPIO function + (or occasionally, it can be a peripheral signal). + Functions 1, 2, and 3 are the alternate functions or peripheral signals that + can be routed to the iopad. The function selection can be carried out by + writing the function number to the iopad function select register. + + Each iopad is configurable with parameters such as input-enable, internal + pull-up/pull-down bias, drive strength, schmitt trigger, slew rate, input + debounce nanoseconds. + +maintainers: + - Changhuang Liang <[email protected]> + +properties: + compatible: + items: + - const: starfive,jhb100-sys0h-pinctrl + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + + interrupts: + maxItems: 1 + + interrupt-controller: true + + '#interrupt-cells': + const: 2 + + gpio-controller: true + + '#gpio-cells': + const: 2 + + gpio-ranges: true + + gpio-line-names: true + +patternProperties: + '-grp$': + type: object + additionalProperties: false + patternProperties: + '-pins$': + type: object + description: | + A pinctrl node should contain at least one subnode representing the + pinctrl groups available in the domain. Each subnode will list the + pins it needs, and how they should be configured, with regard to + function selection, bias, input enable/disable, input schmitt + trigger enable/disable, slew-rate, input debounce nanoseconds and + drive-strength. + allOf: + - $ref: /schemas/pinctrl/pincfg-node.yaml + - $ref: /schemas/pinctrl/pinmux-node.yaml + additionalProperties: false + + properties: + pins: + description: + The list of IOs that properties in the pincfg node apply to. + + function: + description: + A string containing the name of the function to mux for these + pins. + enum: [ espi, espi_reset, espi0_vw, espi1_vw, gpio, scap_trigger ] + + bias-disable: true + + bias-pull-down: + type: boolean + + bias-pull-up: + type: boolean + + drive-strength: + enum: [ 2, 4, 8, 12 ] + + drive-strength-microamp: + enum: [ 2000, 4000, 8000, 12000 ] + + input-debounce-ns: + minimum: 0 + maximum: 10485680 + description: + Debounce time in nanoseconds. The hardware counts in 80 ns + stages with a 17-bit counter, so the maximum is 10485680 ns. + input-disable: true + + input-enable: true + + input-schmitt-enable: true + + input-schmitt-disable: true + + slew-rate: + enum: [ 0, 1 ] + default: 0 + description: | + 0: slow + 1: fast +required: + - compatible + - reg + - resets + - interrupts + - interrupt-controller + - '#interrupt-cells' + - gpio-controller + - '#gpio-cells' + - gpio-ranges + +additionalProperties: false + +examples: + - | + soc { + #address-cells = <2>; + #size-cells = <2>; + + pinctrl_sys0h: pinctrl@13080800 { + compatible = "starfive,jhb100-sys0h-pinctrl"; + reg = <0x0 0x13080800 0x0 0x800>; + resets = <&sys0crg 3>; + interrupts = <57>; + interrupt-controller; + #interrupt-cells = <2>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pinctrl_sys0h 0 0 12>; + }; + };
Signature · 1 line
2.25.1
Re: [PATCH v8 05/22] dt-bindings: pinctrl: Add starfive,jhb100-sys0h-pinctrl
Quoted 9 lines · Changhuang Liang
Add pinctrl bindings for StarFive JHB100 SoC System-0 host(sys0h) pinctrl controller.
Signed-off-by Changhuang Liang <[email protected]>--- .../starfive,jhb100-sys0h-pinctrl.yaml | 162 ++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/starfive,jhb100-sys0h-pinctrl.yaml
PATCH v8 6/22 pinctrl: starfive: Add StarFive JHB100 sys0h controller driver
In reply to Changhuang LiangAdd pinctrl driver for StarFive JHB100 SoC System-0 Host(sys0h) pinctrl controller.
--- drivers/pinctrl/starfive/Kconfig | 11 +++ drivers/pinctrl/starfive/Makefile | 1 + .../starfive/pinctrl-starfive-jhb100-sys0h.c | 99 +++++++++++++++++++ 3 files changed, 111 insertions(+) create mode 100644 drivers/pinctrl/starfive/pinctrl-starfive-jhb100-sys0h.c
drivers/pinctrl/starfive/Kconfig +11 -0
@@ -66,3 +66,14 @@ config PINCTRL_STARFIVE_JHB100_SYS0 This also provides an interface to the GPIO pins not used by other peripherals supporting inputs, outputs, configuring pull-up/pull-down and interrupts on input changes. + +config PINCTRL_STARFIVE_JHB100_SYS0H + tristate "StarFive JHB100 SoC System-0 Host pinctrl and GPIO driver" + depends on ARCH_STARFIVE || COMPILE_TEST + select PINCTRL_STARFIVE_JHB100 + default ARCH_STARFIVE + help + Say yes here to support System-0 Host pin control on the StarFive JHB100 SoC. + This also provides an interface to the GPIO pins not used by other + peripherals supporting inputs, outputs, configuring pull-up/pull-down + and interrupts on input changes.
drivers/pinctrl/starfive/Makefile +1 -0
@@ -8,3 +8,4 @@ obj-$(CONFIG_PINCTRL_STARFIVE_JH7110_AON) += pinctrl-starfive-jh7110-aon.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100) += pinctrl-starfive-jhb100.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_SYS0) += pinctrl-starfive-jhb100-sys0.o +obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_SYS0H) += pinctrl-starfive-jhb100-sys0h.o
drivers/pinctrl/starfive/pinctrl-starfive-jhb100-sys0h.c new file +99 -0
99 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v8 7/22 dt-bindings: pinctrl: Add starfive,jhb100-sys1-pinctrl
In reply to Changhuang LiangAdd pinctrl bindings for StarFive JHB100 SoC System-1(sys1) pinctrl controller.
--- .../pinctrl/starfive,jhb100-sys1-pinctrl.yaml | 164 ++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/starfive,jhb100-sys1-pinctrl.yaml
Documentation/devicetree/bindings/pinctrl/starfive,jhb100-sys1-pinctrl.yaml new file +164 -0
@@ -0,0 +1,164 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/starfive,jhb100-sys1-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: StarFive JHB100 System-1 Pin Controller + +description: | + Pinctrl bindings for JHB100 RISC-V SoC from StarFive Technology Ltd. + + The JHB100 SoC has 13 pinctrl domains - sys0, sys0h, sys1, sys2, per0, per1, + per2, per2pok, per3, adc0, adc1, emmc, and vga. + This document provides an overview of the "sys1" pinctrl domain. + + The "sys1" domain has a pin controller which provides + - function selection for GPIO pads. + - GPIO pad configuration. + - GPIO interrupt handling. + + In the SYS1 Pin Controller, there are 8 multi-function GPIO_PADs. Each of + them can be multiplexed to different hardware blocks through function + selection. Each iopad has a maximum of up to 4 functions - 0, 1, 2, and 3. + Function 0 is the default function which is generally the GPIO function + (or occasionally, it can be a peripheral signal). + Function 1, 2, and 3 are the alternate functions or peripheral signals that + can be routed to the iopad. The function selection can be carried out by + writing the function number to the iopad function select register. + + Each iopad is configurable with parameters such as input-enable, internal + pull-up/pull-down bias, drive strength, schmitt trigger, slew rate, input + debounce nanoseconds. + +maintainers: + - Changhuang Liang <[email protected]> + +properties: + compatible: + items: + - const: starfive,jhb100-sys1-pinctrl + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + + interrupts: + maxItems: 1 + + interrupt-controller: true + + '#interrupt-cells': + const: 2 + + gpio-controller: true + + '#gpio-cells': + const: 2 + + gpio-ranges: true + + gpio-line-names: true + +patternProperties: + '-grp$': + type: object + additionalProperties: false + patternProperties: + '-pins$': + type: object + description: | + A pinctrl node should contain at least one subnode representing the + pinctrl groups available in the domain. Each subnode will list the + pins it needs, and how they should be configured, with regard to + function selection, bias, input enable/disable, input schmitt + trigger enable/disable, slew-rate, input debounce nanoseconds + and drive-strength. + allOf: + - $ref: /schemas/pinctrl/pincfg-node.yaml + - $ref: /schemas/pinctrl/pinmux-node.yaml + additionalProperties: false + + properties: + pins: + description: + The list of IOs that properties in the pincfg node apply to. + + function: + description: + A string containing the name of the function to mux for these + pins. + enum: [ espi, espi_reset, gpio, host0_port80, host1_port80 ] + + bias-disable: true + + bias-pull-down: + type: boolean + + bias-pull-up: + type: boolean + + drive-strength: + enum: [ 2, 4, 8, 12 ] + + drive-strength-microamp: + enum: [ 2000, 4000, 8000, 12000 ] + + input-debounce-ns: + minimum: 0 + maximum: 10485680 + description: + Debounce time in nanoseconds. The hardware counts in 80 ns + stages with a 17-bit counter, so the maximum is 10485680 ns. + + input-disable: true + + input-enable: true + + input-schmitt-enable: true + + input-schmitt-disable: true + + slew-rate: + enum: [ 0, 1 ] + default: 0 + description: | + 0: slow + 1: fast + +required: + - compatible + - reg + - resets + - interrupts + - interrupt-controller + - '#interrupt-cells' + - gpio-controller + - '#gpio-cells' + - gpio-ranges + +additionalProperties: false + +examples: + - | + soc { + #address-cells = <2>; + #size-cells = <2>; + + pinctrl_sys1: pinctrl@13081000 { + compatible = "starfive,jhb100-sys1-pinctrl"; + reg = <0x0 0x13081000 0x0 0x1000>; + resets = <&sys1crg 2>; + interrupts = <58>; + interrupt-controller; + #interrupt-cells = <2>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pinctrl_sys1 0 0 8>; + }; + };
Signature · 1 line
2.25.1
Re: [PATCH v8 07/22] dt-bindings: pinctrl: Add starfive,jhb100-sys1-pinctrl
Quoted 9 lines · Changhuang Liang
Add pinctrl bindings for StarFive JHB100 SoC System-1(sys1) pinctrl controller.
Signed-off-by Changhuang Liang <[email protected]>--- .../pinctrl/starfive,jhb100-sys1-pinctrl.yaml | 164 ++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/starfive,jhb100-sys1-pinctrl.yaml
PATCH v8 8/22 pinctrl: starfive: Add StarFive JHB100 sys1 controller driver
In reply to Changhuang LiangAdd pinctrl driver for StarFive JHB100 SoC System-1(sys1) pinctrl controller.
--- drivers/pinctrl/starfive/Kconfig | 11 +++ drivers/pinctrl/starfive/Makefile | 1 + .../starfive/pinctrl-starfive-jhb100-sys1.c | 94 +++++++++++++++++++ 3 files changed, 106 insertions(+) create mode 100644 drivers/pinctrl/starfive/pinctrl-starfive-jhb100-sys1.c
drivers/pinctrl/starfive/Kconfig +11 -0
@@ -77,3 +77,14 @@ config PINCTRL_STARFIVE_JHB100_SYS0H This also provides an interface to the GPIO pins not used by other peripherals supporting inputs, outputs, configuring pull-up/pull-down and interrupts on input changes. + +config PINCTRL_STARFIVE_JHB100_SYS1 + tristate "StarFive JHB100 SoC System-1 pinctrl and GPIO driver" + depends on ARCH_STARFIVE || COMPILE_TEST + select PINCTRL_STARFIVE_JHB100 + default ARCH_STARFIVE + help + Say yes here to support System-1 pin control on the StarFive JHB100 SoC. + This also provides an interface to the GPIO pins not used by other + peripherals supporting inputs, outputs, configuring pull-up/pull-down + and interrupts on input changes.
drivers/pinctrl/starfive/Makefile +1 -0
@@ -9,3 +9,4 @@ obj-$(CONFIG_PINCTRL_STARFIVE_JH7110_AON) += pinctrl-starfive-jh7110-aon.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100) += pinctrl-starfive-jhb100.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_SYS0) += pinctrl-starfive-jhb100-sys0.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_SYS0H) += pinctrl-starfive-jhb100-sys0h.o +obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_SYS1) += pinctrl-starfive-jhb100-sys1.o
drivers/pinctrl/starfive/pinctrl-starfive-jhb100-sys1.c new file +94 -0
94 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v8 9/22 dt-bindings: pinctrl: Add starfive,jhb100-sys2-pinctrl
In reply to Changhuang LiangAdd pinctrl bindings for StarFive JHB100 SoC System-2(sys2) pinctrl controller.
--- .../pinctrl/starfive,jhb100-sys2-pinctrl.yaml | 165 ++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/starfive,jhb100-sys2-pinctrl.yaml
Documentation/devicetree/bindings/pinctrl/starfive,jhb100-sys2-pinctrl.yaml new file +165 -0
@@ -0,0 +1,165 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/starfive,jhb100-sys2-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: StarFive JHB100 System-2 Pin Controller + +description: | + Pinctrl bindings for JHB100 RISC-V SoC from StarFive Technology Ltd. + + The JHB100 SoC has 13 pinctrl domains - sys0, sys0h, sys1, sys2, per0, per1, + per2, per2pok, per3, adc0, adc1, emmc, and vga. + This document provides an overview of the "sys2" pinctrl domain. + + The "sys2" domain has a pin controller which provides + - function selection for GPIO pads. + - GPIO pad configuration. + - GPIO interrupt handling. + + In the SYS2 Pin Controller, there are 37 multi-function GPIO_PADs. Each of + them can be multiplexed to different hardware blocks through function + selection. Each iopad has a maximum of up to 4 functions - 0, 1, 2, and 3. + Function 0 is the default function which is the GPIO function. + Function 1, 2, and 3 are the alternate functions or peripheral signals that + can be routed to the iopad. The function selection can be carried out by + writing the function number to the iopad function select register. + + Each iopad is configurable with parameters such as input-enable, internal + pull-up/pull-down bias, drive strength, schmitt trigger, slew rate, input + debounce nanoseconds, power source. + +maintainers: + - Changhuang Liang <[email protected]> + +properties: + compatible: + items: + - const: starfive,jhb100-sys2-pinctrl + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + + interrupts: + maxItems: 1 + + interrupt-controller: true + + '#interrupt-cells': + const: 2 + + gpio-controller: true + + '#gpio-cells': + const: 2 + + gpio-ranges: true + + gpio-line-names: true + +patternProperties: + '-grp$': + type: object + additionalProperties: false + patternProperties: + '-pins$': + type: object + description: | + A pinctrl node should contain at least one subnode representing the + pinctrl groups available in the domain. Each subnode will list the + pins it needs, and how they should be configured, with regard to + function selection, bias, input enable/disable, input schmitt + trigger enable/disable, slew-rate, input debounce nanoseconds, + power-source and drive-strength. + allOf: + - $ref: /schemas/pinctrl/pincfg-node.yaml + - $ref: /schemas/pinctrl/pinmux-node.yaml + additionalProperties: false + + properties: + pins: + description: + The list of IOs that properties in the pincfg node apply to. + + function: + description: + A string containing the name of the function to mux for these + pins. + enum: [ gpio, host0_port80, host1_port80, jtag, smbalert, uart ] + + bias-disable: true + + bias-pull-down: + type: boolean + + bias-pull-up: + type: boolean + + drive-strength: + enum: [ 2, 4, 8, 12 ] + + drive-strength-microamp: + enum: [ 2000, 4000, 8000, 12000 ] + + input-debounce-ns: + minimum: 0 + maximum: 10485680 + description: + Debounce time in nanoseconds. The hardware counts in 80 ns + stages with a 17-bit counter, so the maximum is 10485680 ns. + + input-disable: true + + input-enable: true + + input-schmitt-enable: true + + input-schmitt-disable: true + + power-source: + enum: [ 1800, 3300 ] + description: I/O voltage in millivolt. + + slew-rate: + enum: [ 0, 1 ] + default: 0 + description: | + 0: slow + 1: fast + +required: + - compatible + - reg + - interrupts + - interrupt-controller + - '#interrupt-cells' + - gpio-controller + - '#gpio-cells' + - gpio-ranges + +additionalProperties: false + +examples: + - | + soc { + #address-cells = <2>; + #size-cells = <2>; + + pinctrl_sys2: pinctrl@13082000 { + compatible = "starfive,jhb100-sys2-pinctrl"; + reg = <0x0 0x13082000 0x0 0x1000>; + interrupts = <59>; + interrupt-controller; + #interrupt-cells = <2>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pinctrl_sys2 0 0 37>; + }; + };
Signature · 1 line
2.25.1
Re: [PATCH v8 09/22] dt-bindings: pinctrl: Add starfive,jhb100-sys2-pinctrl
Quoted 8 lines · Changhuang Liang
Add pinctrl bindings for StarFive JHB100 SoC System-2(sys2) pinctrl controller.
Signed-off-by Changhuang Liang <[email protected]>--- .../pinctrl/starfive,jhb100-sys2-pinctrl.yaml | 165 ++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/starfive,jhb100-sys2-pinctrl.yaml
PATCH v8 10/22 pinctrl: starfive: Add StarFive JHB100 sys2 controller driver
In reply to Changhuang LiangAdd pinctrl driver for StarFive JHB100 SoC System-2(sys2) pinctrl controller.
--- drivers/pinctrl/starfive/Kconfig | 11 ++ drivers/pinctrl/starfive/Makefile | 1 + .../starfive/pinctrl-starfive-jhb100-sys2.c | 140 ++++++++++++++++++ 3 files changed, 152 insertions(+) create mode 100644 drivers/pinctrl/starfive/pinctrl-starfive-jhb100-sys2.c
drivers/pinctrl/starfive/Kconfig +11 -0
@@ -88,3 +88,14 @@ config PINCTRL_STARFIVE_JHB100_SYS1 This also provides an interface to the GPIO pins not used by other peripherals supporting inputs, outputs, configuring pull-up/pull-down and interrupts on input changes. + +config PINCTRL_STARFIVE_JHB100_SYS2 + tristate "StarFive JHB100 SoC System-2 pinctrl and GPIO driver" + depends on ARCH_STARFIVE || COMPILE_TEST + select PINCTRL_STARFIVE_JHB100 + default ARCH_STARFIVE + help + Say yes here to support System-2 pin control on the StarFive JHB100 SoC. + This also provides an interface to the GPIO pins not used by other + peripherals supporting inputs, outputs, configuring pull-up/pull-down + and interrupts on input changes.
drivers/pinctrl/starfive/Makefile +1 -0
@@ -10,3 +10,4 @@ obj-$(CONFIG_PINCTRL_STARFIVE_JHB100) += pinctrl-starfive-jhb100.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_SYS0) += pinctrl-starfive-jhb100-sys0.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_SYS0H) += pinctrl-starfive-jhb100-sys0h.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_SYS1) += pinctrl-starfive-jhb100-sys1.o +obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_SYS2) += pinctrl-starfive-jhb100-sys2.o
drivers/pinctrl/starfive/pinctrl-starfive-jhb100-sys2.c new file +140 -0
140 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v8 11/22 dt-bindings: pinctrl: Add starfive,jhb100-per0-pinctrl
In reply to Changhuang LiangAdd pinctrl bindings for StarFive JHB100 SoC Peripheral-0(per0) pinctrl controller.
--- .../pinctrl/starfive,jhb100-per0-pinctrl.yaml | 179 ++++++++++++++++++ 1 file changed, 179 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/starfive,jhb100-per0-pinctrl.yaml
Documentation/devicetree/bindings/pinctrl/starfive,jhb100-per0-pinctrl.yaml new file +179 -0
@@ -0,0 +1,179 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/starfive,jhb100-per0-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: StarFive JHB100 Peripheral-0 Pin Controller + +description: | + Pinctrl bindings for JHB100 RISC-V SoC from StarFive Technology Ltd. + + The JHB100 SoC has 13 pinctrl domains - sys0, sys0h, sys1, sys2, per0, per1, + per2, per2pok, per3, adc0, adc1, emmc, and vga. + This document provides an overview of the "per0" pinctrl domain. + + The "per0" domain has a pin controller which provides + - function selection for GPIO pads. + - GPIO pad configuration. + - GPIO interrupt handling. + + In the Peripheral-0 Pin Controller, there are 60 multi-function GPIO_PADs. + Each of them can be multiplexed to several hardware blocks through function + selection. Each iopad has a maximum of up to 3 functions - 0, 1, and 2. + Function 0 is the default function which is generally the GPIO function. + Function 1 and 2 are the alternate function or signal of an iopad. The + function 1 and function 2 are other optional functions or peripheral + signals that can be routed to an iopad. The function selection can be carried + out by writing the function number to the iopad function select register. + + Each iopad is configurable with parameters such as input-enable, internal + pull-up/pull-down bias, drive strength, schmitt trigger, slew rate, input + debounce nanoseconds, power source and drive type (open-drain or push-pull). + +maintainers: + - Changhuang Liang <[email protected]> + +properties: + compatible: + items: + - const: starfive,jhb100-per0-pinctrl + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + + interrupts: + maxItems: 1 + + interrupt-controller: true + + '#interrupt-cells': + const: 2 + + gpio-controller: true + + '#gpio-cells': + const: 2 + + gpio-ranges: true + + gpio-line-names: true + +patternProperties: + '-grp$': + type: object + additionalProperties: false + patternProperties: + '-pins$': + type: object + description: | + A pinctrl node should contain at least one subnode representing the + pinctrl groups available in the domain. Each subnode will list the + pins it needs, and how they should be configured, with regard to + function selection, bias, input enable/disable, input schmitt + trigger enable/disable, slew-rate, input debounce nanoseconds, + drive-open-drain, drive-push-pull, power-source and drive-strength. + allOf: + - $ref: /schemas/pinctrl/pincfg-node.yaml + - $ref: /schemas/pinctrl/pinmux-node.yaml + additionalProperties: false + + properties: + pins: + description: + The list of IOs that properties in the pincfg node apply to. + + function: + description: + A string containing the name of the function to mux for these + pins. + enum: [ gmac_mdio, gpio, i2c, i3c, smbalert, wdt ] + + bias-disable: true + + bias-pull-down: + type: boolean + + bias-pull-up: + oneOf: + - type: boolean + - enum: [ 600, 900, 1200, 2000 ] + description: Pull up RSEL type resistance values (in ohms) + description: + For normal pull up type there is no need to specify a resistance + value, hence this can be specified as a boolean property. + For RSEL pull up type a resistance value (in ohms) can be added. + + drive-open-drain: true + + drive-push-pull: true + + drive-strength: + enum: [ 2, 4, 8, 12 ] + + drive-strength-microamp: + enum: [ 2000, 4000, 8000, 12000 ] + + input-debounce-ns: + minimum: 0 + maximum: 10485680 + description: + Debounce time in nanoseconds. The hardware counts in 80 ns + stages with a 17-bit counter, so the maximum is 10485680 ns. + + input-disable: true + + input-enable: true + + input-schmitt-enable: true + + input-schmitt-disable: true + + power-source: + enum: [ 1800, 3300 ] + description: I/O voltage in millivolt. + + slew-rate: + enum: [ 0, 1 ] + default: 0 + description: | + 0: slow + 1: fast + +required: + - compatible + - reg + - resets + - interrupts + - interrupt-controller + - '#interrupt-cells' + - gpio-controller + - '#gpio-cells' + - gpio-ranges + +additionalProperties: false + +examples: + - | + soc { + #address-cells = <2>; + #size-cells = <2>; + + pinctrl_per0: pinctrl@11a0a000 { + compatible = "starfive,jhb100-per0-pinctrl"; + reg = <0x0 0x11a0a000 0x0 0x1000>; + resets = <&per0crg 0>; + interrupts = <60>; + interrupt-controller; + #interrupt-cells = <2>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pinctrl_per0 0 0 60>; + }; + };
Signature · 1 line
2.25.1
Re: [PATCH v8 11/22] dt-bindings: pinctrl: Add starfive,jhb100-per0-pinctrl
Quoted 9 lines · Changhuang Liang
Add pinctrl bindings for StarFive JHB100 SoC Peripheral-0(per0) pinctrl controller.
Signed-off-by Changhuang Liang <[email protected]>--- .../pinctrl/starfive,jhb100-per0-pinctrl.yaml | 179 ++++++++++++++++++ 1 file changed, 179 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/starfive,jhb100-per0-pinctrl.yaml
PATCH v8 12/22 pinctrl: starfive: Add StarFive JHB100 per0 controller driver
In reply to Changhuang LiangAdd pinctrl driver for StarFive JHB100 SoC Peripheral-0(per0) pinctrl controller.
--- drivers/pinctrl/starfive/Kconfig | 11 ++ drivers/pinctrl/starfive/Makefile | 1 + .../starfive/pinctrl-starfive-jhb100-per0.c | 182 ++++++++++++++++++ 3 files changed, 194 insertions(+) create mode 100644 drivers/pinctrl/starfive/pinctrl-starfive-jhb100-per0.c
drivers/pinctrl/starfive/Kconfig +11 -0
@@ -56,6 +56,17 @@ config PINCTRL_STARFIVE_JHB100 select GPIOLIB_IRQCHIP select OF_GPIO +config PINCTRL_STARFIVE_JHB100_PER0 + tristate "StarFive JHB100 SoC Peripheral-0 pinctrl and GPIO driver" + depends on ARCH_STARFIVE || COMPILE_TEST + select PINCTRL_STARFIVE_JHB100 + default ARCH_STARFIVE + help + Say yes here to support Peripheral-0 pin control on the StarFive JHB100 SoC. + This also provides an interface to the GPIO pins not used by other + peripherals supporting inputs, outputs, configuring pull-up/pull-down + and interrupts on input changes. + config PINCTRL_STARFIVE_JHB100_SYS0 tristate "StarFive JHB100 SoC System-0 pinctrl and GPIO driver" depends on ARCH_STARFIVE || COMPILE_TEST
drivers/pinctrl/starfive/Makefile +1 -0
@@ -7,6 +7,7 @@ obj-$(CONFIG_PINCTRL_STARFIVE_JH7110_SYS) += pinctrl-starfive-jh7110-sys.o obj-$(CONFIG_PINCTRL_STARFIVE_JH7110_AON) += pinctrl-starfive-jh7110-aon.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100) += pinctrl-starfive-jhb100.o +obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_PER0) += pinctrl-starfive-jhb100-per0.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_SYS0) += pinctrl-starfive-jhb100-sys0.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_SYS0H) += pinctrl-starfive-jhb100-sys0h.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_SYS1) += pinctrl-starfive-jhb100-sys1.o
drivers/pinctrl/starfive/pinctrl-starfive-jhb100-per0.c new file +182 -0
182 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v8 13/22 dt-bindings: pinctrl: Add starfive,jhb100-per1-pinctrl
In reply to Changhuang LiangAdd pinctrl bindings for StarFive JHB100 SoC Peripheral-1(per1) pinctrl controller.
--- .../pinctrl/starfive,jhb100-per1-pinctrl.yaml | 178 ++++++++++++++++++ 1 file changed, 178 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/starfive,jhb100-per1-pinctrl.yaml
Documentation/devicetree/bindings/pinctrl/starfive,jhb100-per1-pinctrl.yaml new file +178 -0
@@ -0,0 +1,178 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/starfive,jhb100-per1-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: StarFive JHB100 Peripheral-1 Pin Controller + +description: | + Pinctrl bindings for JHB100 RISC-V SoC from StarFive Technology Ltd. + + The JHB100 SoC has 13 pinctrl domains - sys0, sys0h, sys1, sys2, per0, per1, + per2, per2pok, per3, adc0, adc1, emmc, and vga. + This document provides an overview of the "per1" pinctrl domain. + + The "per1" domain has a pin controller which provides + - function selection for GPIO pads. + - GPIO pad configuration. + - GPIO interrupt handling. + + In the Peripheral-1 Pin Controller, there are 36 multi-function GPIO_PADs. + Each of them can be multiplexed to several peripherals through function + selection. Each iopad has a maximum of up to 3 functions - 0, 1, and 2. + Function 0 is the default function which is generally the GPIO function. + Function 1 and 2 are the alternate functions or peripheral signals that + can be routed to the iopad. The function selection can be carried out by + writing the function number to the iopad function select register. + + Each iopad is configurable with parameters such as input-enable, internal + pull-up/pull-down bias, drive strength, schmitt trigger, slew rate, input + debounce nanoseconds, power source and drive type (open-drain or push-pull). + +maintainers: + - Changhuang Liang <[email protected]> + +properties: + compatible: + items: + - const: starfive,jhb100-per1-pinctrl + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + + interrupts: + maxItems: 1 + + interrupt-controller: true + + '#interrupt-cells': + const: 2 + + gpio-controller: true + + '#gpio-cells': + const: 2 + + gpio-ranges: true + + gpio-line-names: true + +patternProperties: + '-grp$': + type: object + additionalProperties: false + patternProperties: + '-pins$': + type: object + description: | + A pinctrl node should contain at least one subnode representing the + pinctrl groups available in the domain. Each subnode will list the + pins it needs, and how they should be configured, with regard to + function selection, bias, input enable/disable, input schmitt + trigger enable/disable, slew-rate, input debounce nanoseconds, + drive-open-drain, drive-push-pull, power-source and drive-strength. + allOf: + - $ref: /schemas/pinctrl/pincfg-node.yaml + - $ref: /schemas/pinctrl/pinmux-node.yaml + additionalProperties: false + + properties: + pins: + description: + The list of IOs that properties in the pincfg node apply to. + + function: + description: + A string containing the name of the function to mux for these + pins. + enum: [ gpio, i2c, sfc, sgpio, spi ] + + bias-disable: true + + bias-pull-down: + type: boolean + + bias-pull-up: + oneOf: + - type: boolean + - enum: [ 600, 900, 1200, 2000 ] + description: Pull up RSEL type resistance values (in ohms) + description: + For normal pull up type there is no need to specify a resistance + value, hence this can be specified as a boolean property. + For RSEL pull up type a resistance value (in ohms) can be added. + + drive-open-drain: true + + drive-push-pull: true + + drive-strength: + enum: [ 2, 4, 8, 12 ] + + drive-strength-microamp: + enum: [ 2000, 4000, 8000, 12000 ] + + input-debounce-ns: + minimum: 0 + maximum: 10485680 + description: + Debounce time in nanoseconds. The hardware counts in 80 ns + stages with a 17-bit counter, so the maximum is 10485680 ns. + + input-disable: true + + input-enable: true + + input-schmitt-enable: true + + input-schmitt-disable: true + + power-source: + enum: [ 1800, 3300 ] + description: I/O voltage in millivolt. + + slew-rate: + enum: [ 0, 1 ] + default: 0 + description: | + 0: slow + 1: fast + +required: + - compatible + - reg + - resets + - interrupts + - interrupt-controller + - '#interrupt-cells' + - gpio-controller + - '#gpio-cells' + - gpio-ranges + +additionalProperties: false + +examples: + - | + soc { + #address-cells = <2>; + #size-cells = <2>; + + pinctrl_per1: pinctrl@11b42000 { + compatible = "starfive,jhb100-per1-pinctrl"; + reg = <0x0 0x11b42000 0x0 0x800>; + resets = <&per1crg 0>; + interrupts = <61>; + interrupt-controller; + #interrupt-cells = <2>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pinctrl_per1 0 0 36>; + }; + };
Signature · 1 line
2.25.1
Re: [PATCH v8 13/22] dt-bindings: pinctrl: Add starfive,jhb100-per1-pinctrl
Quoted 9 lines · Changhuang Liang
Add pinctrl bindings for StarFive JHB100 SoC Peripheral-1(per1) pinctrl controller.
Signed-off-by Changhuang Liang <[email protected]>--- .../pinctrl/starfive,jhb100-per1-pinctrl.yaml | 178 ++++++++++++++++++ 1 file changed, 178 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/starfive,jhb100-per1-pinctrl.yaml
PATCH v8 14/22 pinctrl: starfive: Add StarFive JHB100 per1 controller driver
In reply to Changhuang LiangAdd pinctrl driver for StarFive JHB100 SoC Peripheral-1(per1) pinctrl controller.
--- drivers/pinctrl/starfive/Kconfig | 11 + drivers/pinctrl/starfive/Makefile | 1 + .../starfive/pinctrl-starfive-jhb100-per1.c | 193 ++++++++++++++++++ 3 files changed, 205 insertions(+) create mode 100644 drivers/pinctrl/starfive/pinctrl-starfive-jhb100-per1.c
drivers/pinctrl/starfive/Kconfig +11 -0
@@ -67,6 +67,17 @@ config PINCTRL_STARFIVE_JHB100_PER0 peripherals supporting inputs, outputs, configuring pull-up/pull-down and interrupts on input changes. +config PINCTRL_STARFIVE_JHB100_PER1 + tristate "StarFive JHB100 SoC Peripheral-1 pinctrl and GPIO driver" + depends on ARCH_STARFIVE || COMPILE_TEST + select PINCTRL_STARFIVE_JHB100 + default ARCH_STARFIVE + help + Say yes here to support Peripheral-1 pin control on the StarFive JHB100 SoC. + This also provides an interface to the GPIO pins not used by other + peripherals supporting inputs, outputs, configuring pull-up/pull-down + and interrupts on input changes. + config PINCTRL_STARFIVE_JHB100_SYS0 tristate "StarFive JHB100 SoC System-0 pinctrl and GPIO driver" depends on ARCH_STARFIVE || COMPILE_TEST
drivers/pinctrl/starfive/Makefile +1 -0
@@ -8,6 +8,7 @@ obj-$(CONFIG_PINCTRL_STARFIVE_JH7110_AON) += pinctrl-starfive-jh7110-aon.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100) += pinctrl-starfive-jhb100.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_PER0) += pinctrl-starfive-jhb100-per0.o +obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_PER1) += pinctrl-starfive-jhb100-per1.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_SYS0) += pinctrl-starfive-jhb100-sys0.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_SYS0H) += pinctrl-starfive-jhb100-sys0h.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_SYS1) += pinctrl-starfive-jhb100-sys1.o
drivers/pinctrl/starfive/pinctrl-starfive-jhb100-per1.c new file +193 -0
193 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v8 15/22 dt-bindings: pinctrl: Add starfive,jhb100-per2-pinctrl
In reply to Changhuang LiangAdd pinctrl bindings for StarFive JHB100 SoC Peripheral-2(per2) pinctrl controller.
--- .../pinctrl/starfive,jhb100-per2-pinctrl.yaml | 168 ++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/starfive,jhb100-per2-pinctrl.yaml
Documentation/devicetree/bindings/pinctrl/starfive,jhb100-per2-pinctrl.yaml new file +168 -0
@@ -0,0 +1,168 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/starfive,jhb100-per2-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: StarFive JHB100 Peripheral-2 Pin Controller + +description: | + Pinctrl bindings for JHB100 RISC-V SoC from StarFive Technology Ltd. + + The JHB100 SoC has 13 pinctrl domains - sys0, sys0h, sys1, sys2, per0, per1, + per2, per2pok, per3, adc0, adc1, emmc, and vga. + This document provides an overview of the "per2" pinctrl domain. + + The "per2" domain has a pin controller which provides + - function selection for GPIO pads. + - GPIO pad configuration. + - GPIO interrupt handling. + + In the Peripheral-2 Pin Controller, there are 31 multi-function GPIO_PADs. + Each of them can be multiplexed to several peripherals through function + selection. Each iopad has a maximum of up to 4 functions - 0, 1, 2, and 3. + Function 0 is the default function which is generally the GPIO function. + Function 1, 2, and 3 are the alternate functions or peripheral signals + that can be routed to an iopad. The function selection can be carried + out by writing the function number to the iopad function select register. + + Each iopad is configurable with parameters such as input-enable, internal + pull-up/pull-down bias, drive strength, schmitt trigger, slew rate, input + debounce nanoseconds, power source. + +maintainers: + - Changhuang Liang <[email protected]> + +properties: + compatible: + items: + - const: starfive,jhb100-per2-pinctrl + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + + interrupts: + maxItems: 1 + + interrupt-controller: true + + '#interrupt-cells': + const: 2 + + gpio-controller: true + + '#gpio-cells': + const: 2 + + gpio-ranges: true + + gpio-line-names: true + +patternProperties: + '-grp$': + type: object + additionalProperties: false + patternProperties: + '-pins$': + type: object + description: | + A pinctrl node should contain at least one subnode representing the + pinctrl groups available in the domain. Each subnode will list the + pins it needs, and how they should be configured, with regard to + function selection, bias, input enable/disable, input schmitt + trigger enable/disable, slew-rate, input debounce nanoseconds, + power-source and drive-strength. + allOf: + - $ref: /schemas/pinctrl/pincfg-node.yaml + - $ref: /schemas/pinctrl/pinmux-node.yaml + additionalProperties: false + + properties: + pins: + description: + The list of IOs that properties in the pincfg node apply to. + + function: + description: + A string containing the name of the function to mux for these + pins. + enum: [ fan_tach, gmac_rgmii, gmac_rmii, gpio, host0_port80, + host1_port80 ] + + bias-disable: true + + bias-pull-down: + type: boolean + + bias-pull-up: + type: boolean + + drive-strength: + enum: [ 2, 4, 8, 12 ] + + drive-strength-microamp: + enum: [ 2000, 4000, 8000, 12000 ] + + input-debounce-ns: + minimum: 0 + maximum: 10485680 + description: + Debounce time in nanoseconds. The hardware counts in 80 ns + stages with a 17-bit counter, so the maximum is 10485680 ns. + + input-disable: true + + input-enable: true + + input-schmitt-enable: true + + input-schmitt-disable: true + + power-source: + enum: [ 1800, 2500, 3300 ] + description: I/O voltage in millivolt. + + slew-rate: + enum: [ 0, 1 ] + default: 0 + description: | + 0: slow + 1: fast + +required: + - compatible + - reg + - resets + - interrupts + - interrupt-controller + - '#interrupt-cells' + - gpio-controller + - '#gpio-cells' + - gpio-ranges + +additionalProperties: false + +examples: + - | + soc { + #address-cells = <2>; + #size-cells = <2>; + + pinctrl_per2: pinctrl@11bc2000 { + compatible = "starfive,jhb100-per2-pinctrl"; + reg = <0x0 0x11bc2000 0x0 0x400>; + resets = <&per2crg 0>; + interrupts = <62>; + interrupt-controller; + #interrupt-cells = <2>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pinctrl_per2 0 0 31>; + }; + };
Signature · 1 line
2.25.1
Re: [PATCH v8 15/22] dt-bindings: pinctrl: Add starfive,jhb100-per2-pinctrl
Quoted 9 lines · Changhuang Liang
Add pinctrl bindings for StarFive JHB100 SoC Peripheral-2(per2) pinctrl controller.
Signed-off-by Changhuang Liang <[email protected]>--- .../pinctrl/starfive,jhb100-per2-pinctrl.yaml | 168 ++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/starfive,jhb100-per2-pinctrl.yaml
PATCH v8 16/22 pinctrl: starfive: Add StarFive JHB100 per2 controller driver
In reply to Changhuang LiangAdd pinctrl driver for StarFive JHB100 SoC Peripheral-2(per2) pinctrl controller.
--- drivers/pinctrl/starfive/Kconfig | 11 ++ drivers/pinctrl/starfive/Makefile | 1 + .../starfive/pinctrl-starfive-jhb100-per2.c | 136 ++++++++++++++++++ 3 files changed, 148 insertions(+) create mode 100644 drivers/pinctrl/starfive/pinctrl-starfive-jhb100-per2.c
drivers/pinctrl/starfive/Kconfig +11 -0
@@ -78,6 +78,17 @@ config PINCTRL_STARFIVE_JHB100_PER1 peripherals supporting inputs, outputs, configuring pull-up/pull-down and interrupts on input changes. +config PINCTRL_STARFIVE_JHB100_PER2 + tristate "StarFive JHB100 SoC Peripheral-2 pinctrl and GPIO driver" + depends on ARCH_STARFIVE || COMPILE_TEST + select PINCTRL_STARFIVE_JHB100 + default ARCH_STARFIVE + help + Say yes here to support Peripheral-2 pin control on the StarFive JHB100 SoC. + This also provides an interface to the GPIO pins not used by other + peripherals supporting inputs, outputs, configuring pull-up/pull-down + and interrupts on input changes. + config PINCTRL_STARFIVE_JHB100_SYS0 tristate "StarFive JHB100 SoC System-0 pinctrl and GPIO driver" depends on ARCH_STARFIVE || COMPILE_TEST
drivers/pinctrl/starfive/Makefile +1 -0
@@ -9,6 +9,7 @@ obj-$(CONFIG_PINCTRL_STARFIVE_JH7110_AON) += pinctrl-starfive-jh7110-aon.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100) += pinctrl-starfive-jhb100.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_PER0) += pinctrl-starfive-jhb100-per0.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_PER1) += pinctrl-starfive-jhb100-per1.o +obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_PER2) += pinctrl-starfive-jhb100-per2.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_SYS0) += pinctrl-starfive-jhb100-sys0.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_SYS0H) += pinctrl-starfive-jhb100-sys0h.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_SYS1) += pinctrl-starfive-jhb100-sys1.o
drivers/pinctrl/starfive/pinctrl-starfive-jhb100-per2.c new file +136 -0
136 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v8 17/22 dt-bindings: pinctrl: Add starfive,jhb100-per2pok-pinctrl
In reply to Changhuang LiangAdd pinctrl bindings for StarFive JHB100 SoC Peripheral-2 Power OK (per2pok) pinctrl controller.
--- .../starfive,jhb100-per2pok-pinctrl.yaml | 162 ++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/starfive,jhb100-per2pok-pinctrl.yaml
Documentation/devicetree/bindings/pinctrl/starfive,jhb100-per2pok-pinctrl.yaml new file +162 -0
@@ -0,0 +1,162 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/starfive,jhb100-per2pok-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: StarFive JHB100 Peripheral-2 Power OK Pin Controller + +description: | + Pinctrl bindings for JHB100 RISC-V SoC from StarFive Technology Ltd. + + The JHB100 SoC has 13 pinctrl domains - sys0, sys0h, sys1, sys2, per0, per1, + per2, per2pok, per3, adc0, adc1, emmc, and vga. + This document provides an overview of the "per2pok" pinctrl domain. + + The "per2pok" domain has a pin controller which provides + - function selection for GPIO pads. + - GPIO interrupt handling. + + In the Peripheral-2 Power OK Pin Controller, there are 18 multi-function + GPIO_PADs. Each can be multiplexed to several peripherals through function + selection. Each iopad has a maximum of up to 4 functions - 0, 1, 2, and 3. + Function 0 is the default function or generally the GPIO function. + Function 1, 2, and 3 are alternate functions or peripheral signals that can + be routed to an iopad. The function selection can be carried out by writing + the function number to the iopad function select register. + + Each iopad is configurable with parameters such as input-enable, internal + pull-up/pull-down bias, drive strength, schmitt trigger, slew rate, input + debounce nanoseconds. + +maintainers: + - Changhuang Liang <[email protected]> + +properties: + compatible: + items: + - const: starfive,jhb100-per2pok-pinctrl + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + + interrupts: + maxItems: 1 + + interrupt-controller: true + + '#interrupt-cells': + const: 2 + + gpio-controller: true + + '#gpio-cells': + const: 2 + + gpio-ranges: true + + gpio-line-names: true + +patternProperties: + '-grp$': + type: object + additionalProperties: false + patternProperties: + '-pins$': + type: object + description: | + A pinctrl node should contain at least one subnode representing the + pinctrl groups available in the domain. Each subnode will list the + pins it needs, and how they should be configured, with regard to + function selection, bias, input enable/disable, input schmitt + trigger enable/disable, slew-rate, input debounce nanoseconds + and drive-strength. + allOf: + - $ref: /schemas/pinctrl/pincfg-node.yaml + - $ref: /schemas/pinctrl/pinmux-node.yaml + additionalProperties: false + + properties: + pins: + description: + The list of IOs that properties in the pincfg node apply to. + + function: + description: + A string containing the name of the function to mux for these + pins. + enum: [ can, gpio, host0_port80, host1_port80, passthru, pwm ] + + bias-disable: true + + bias-pull-down: + type: boolean + + bias-pull-up: + type: boolean + + drive-strength: + enum: [ 2, 4, 8, 12 ] + + drive-strength-microamp: + enum: [ 2000, 4000, 8000, 12000 ] + + input-debounce-ns: + minimum: 0 + maximum: 10485680 + description: + Debounce time in nanoseconds. The hardware counts in 80 ns + stages with a 17-bit counter, so the maximum is 10485680 ns. + + input-disable: true + + input-enable: true + + input-schmitt-enable: true + + input-schmitt-disable: true + + slew-rate: + enum: [ 0, 1 ] + default: 0 + description: | + 0: slow + 1: fast + +required: + - compatible + - reg + - resets + - interrupts + - interrupt-controller + - '#interrupt-cells' + - gpio-controller + - '#gpio-cells' + - gpio-ranges + +additionalProperties: false + +examples: + - | + soc { + #address-cells = <2>; + #size-cells = <2>; + + pinctrl_per2pok: pinctrl@11bc2400 { + compatible = "starfive,jhb100-per2pok-pinctrl"; + reg = <0x0 0x11bc2400 0x0 0x400>; + resets = <&per2crg 1>; + interrupts = <63>; + interrupt-controller; + #interrupt-cells = <2>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pinctrl_per2pok 0 0 18>; + }; + };
Signature · 7 lines
2.25.1 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Re: [PATCH v8 17/22] dt-bindings: pinctrl: Add starfive,jhb100-per2pok-pinctrl
Quoted 9 lines · Changhuang Liang
Add pinctrl bindings for StarFive JHB100 SoC Peripheral-2 Power OK (per2pok) pinctrl controller.
Signed-off-by Changhuang Liang <[email protected]>--- .../starfive,jhb100-per2pok-pinctrl.yaml | 162 ++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/starfive,jhb100-per2pok-pinctrl.yaml
PATCH v8 18/22 pinctrl: starfive: Add StarFive JHB100 per2pok controller driver
In reply to Changhuang LiangAdd pinctrl driver for StarFive JHB100 SoC Peripheral-2 Power OK (per2pok) pinctrl controller.
--- drivers/pinctrl/starfive/Kconfig | 11 +++ drivers/pinctrl/starfive/Makefile | 1 + .../pinctrl-starfive-jhb100-per2pok.c | 99 +++++++++++++++++++ 3 files changed, 111 insertions(+) create mode 100644 drivers/pinctrl/starfive/pinctrl-starfive-jhb100-per2pok.c
drivers/pinctrl/starfive/Kconfig +11 -0
@@ -89,6 +89,17 @@ config PINCTRL_STARFIVE_JHB100_PER2 peripherals supporting inputs, outputs, configuring pull-up/pull-down and interrupts on input changes. +config PINCTRL_STARFIVE_JHB100_PER2POK + tristate "StarFive JHB100 SoC Peripheral-2 Power OK pinctrl and GPIO driver" + depends on ARCH_STARFIVE || COMPILE_TEST + select PINCTRL_STARFIVE_JHB100 + default ARCH_STARFIVE + help + Say yes here to support Peripheral-2 Power OK pin control on the StarFive JHB100 SoC. + This also provides an interface to the GPIO pins not used by other + peripherals supporting inputs, outputs, configuring pull-up/pull-down + and interrupts on input changes. + config PINCTRL_STARFIVE_JHB100_SYS0 tristate "StarFive JHB100 SoC System-0 pinctrl and GPIO driver" depends on ARCH_STARFIVE || COMPILE_TEST
drivers/pinctrl/starfive/Makefile +1 -0
@@ -10,6 +10,7 @@ obj-$(CONFIG_PINCTRL_STARFIVE_JHB100) += pinctrl-starfive-jhb100.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_PER0) += pinctrl-starfive-jhb100-per0.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_PER1) += pinctrl-starfive-jhb100-per1.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_PER2) += pinctrl-starfive-jhb100-per2.o +obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_PER2POK) += pinctrl-starfive-jhb100-per2pok.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_SYS0) += pinctrl-starfive-jhb100-sys0.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_SYS0H) += pinctrl-starfive-jhb100-sys0h.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_SYS1) += pinctrl-starfive-jhb100-sys1.o
drivers/pinctrl/starfive/pinctrl-starfive-jhb100-per2pok.c new file +99 -0
99 lines not on this page · raw message
Signature · 7 lines
2.25.1 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH v8 19/22 dt-bindings: pinctrl: Add starfive,jhb100-per3-pinctrl
In reply to Changhuang LiangAdd pinctrl bindings for StarFive JHB100 SoC Peripheral-3(per3) pinctrl controller.
--- .../pinctrl/starfive,jhb100-per3-pinctrl.yaml | 166 ++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/starfive,jhb100-per3-pinctrl.yaml
Documentation/devicetree/bindings/pinctrl/starfive,jhb100-per3-pinctrl.yaml new file +166 -0
@@ -0,0 +1,166 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/starfive,jhb100-per3-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: StarFive JHB100 Peripheral-3 Pin Controller + +description: | + Pinctrl bindings for JHB100 RISC-V SoC from StarFive Technology Ltd. + + The JHB100 SoC has 13 pinctrl domains - sys0, sys0h, sys1, sys2, per0, per1, + per2, per2pok, per3, adc0, adc1, emmc, and vga. + This document provides an overview of the "per3" pinctrl domain. + + The "per3" domain has a pin controller which provides + - function selection for GPIO pads. + - GPIO interrupt handling. + + In the Peripheral-3 Pin Controller, there are 11 multi-function GPIO_PADs. + Each of them can be multiplexed to several peripherals through function + selection. Each iopad has a maximum of up to 2 functions - 0 and 1. + Function 0 is the default function which is generally the GPIO function. + Function 1 is the alternate function or peripheral signal that can be + routed to an iopad. The function selection can be carried out by writing + the function number to the iopad function select register. + + Each iopad is configurable with parameters such as input-enable, internal + pull-up/pull-down bias, drive strength, schmitt trigger, slew rate, input + debounce nanoseconds, power source. + +maintainers: + - Changhuang Liang <[email protected]> + +properties: + compatible: + items: + - const: starfive,jhb100-per3-pinctrl + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + + interrupts: + maxItems: 1 + + interrupt-controller: true + + '#interrupt-cells': + const: 2 + + gpio-controller: true + + '#gpio-cells': + const: 2 + + gpio-ranges: true + + gpio-line-names: true + +patternProperties: + '-grp$': + type: object + additionalProperties: false + patternProperties: + '-pins$': + type: object + description: | + A pinctrl node should contain at least one subnode representing the + pinctrl groups available in the domain. Each subnode will list the + pins it needs, and how they should be configured, with regard to + function selection, bias, input enable/disable, input schmitt + trigger enable/disable, slew-rate, input debounce nanoseconds, + power-source and drive-strength. + allOf: + - $ref: /schemas/pinctrl/pincfg-node.yaml + - $ref: /schemas/pinctrl/pinmux-node.yaml + additionalProperties: false + + properties: + pins: + description: + The list of IOs that properties in the pincfg node apply to. + + function: + description: + A string containing the name of the function to mux for these + pins. + enum: [ gmac_mdio, gmac_rmii, gpio ] + + bias-disable: true + + bias-pull-down: + type: boolean + + bias-pull-up: + type: boolean + + drive-strength: + enum: [ 2, 4, 8, 12 ] + + drive-strength-microamp: + enum: [ 2000, 4000, 8000, 12000 ] + + input-debounce-ns: + minimum: 0 + maximum: 10485680 + description: + Debounce time in nanoseconds. The hardware counts in 80 ns + stages with a 17-bit counter, so the maximum is 10485680 ns. + + input-disable: true + + input-enable: true + + input-schmitt-enable: true + + input-schmitt-disable: true + + power-source: + enum: [ 1800, 2500, 3300 ] + description: I/O voltage in millivolt. + + slew-rate: + enum: [ 0, 1 ] + default: 0 + description: | + 0: slow + 1: fast + +required: + - compatible + - reg + - resets + - interrupts + - interrupt-controller + - '#interrupt-cells' + - gpio-controller + - '#gpio-cells' + - gpio-ranges + +additionalProperties: false + +examples: + - | + soc { + #address-cells = <2>; + #size-cells = <2>; + + pinctrl_per3: pinctrl@11c42000 { + compatible = "starfive,jhb100-per3-pinctrl"; + reg = <0x0 0x11c42000 0x0 0x1000>; + resets = <&per3crg 6>; + interrupts = <64>; + interrupt-controller; + #interrupt-cells = <2>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pinctrl_per3 0 0 11>; + }; + };
Signature · 7 lines
2.25.1 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Re: [PATCH v8 19/22] dt-bindings: pinctrl: Add starfive,jhb100-per3-pinctrl
Quoted 9 lines · Changhuang Liang
Add pinctrl bindings for StarFive JHB100 SoC Peripheral-3(per3) pinctrl controller.
Signed-off-by Changhuang Liang <[email protected]>--- .../pinctrl/starfive,jhb100-per3-pinctrl.yaml | 166 ++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/starfive,jhb100-per3-pinctrl.yaml
PATCH v8 20/22 pinctrl: starfive: Add StarFive JHB100 per3 controller driver
In reply to Changhuang LiangAdd pinctrl driver for StarFive JHB100 SoC Peripheral-3(per3) pinctrl controller.
--- drivers/pinctrl/starfive/Kconfig | 11 ++ drivers/pinctrl/starfive/Makefile | 1 + .../starfive/pinctrl-starfive-jhb100-per3.c | 129 ++++++++++++++++++ 3 files changed, 141 insertions(+) create mode 100644 drivers/pinctrl/starfive/pinctrl-starfive-jhb100-per3.c
drivers/pinctrl/starfive/Kconfig +11 -0
@@ -100,6 +100,17 @@ config PINCTRL_STARFIVE_JHB100_PER2POK peripherals supporting inputs, outputs, configuring pull-up/pull-down and interrupts on input changes. +config PINCTRL_STARFIVE_JHB100_PER3 + tristate "StarFive JHB100 SoC Peripheral-3 pinctrl and GPIO driver" + depends on ARCH_STARFIVE || COMPILE_TEST + select PINCTRL_STARFIVE_JHB100 + default ARCH_STARFIVE + help + Say yes here to support Peripheral-3 pin control on the StarFive JHB100 SoC. + This also provides an interface to the GPIO pins not used by other + peripherals supporting inputs, outputs, configuring pull-up/pull-down + and interrupts on input changes. + config PINCTRL_STARFIVE_JHB100_SYS0 tristate "StarFive JHB100 SoC System-0 pinctrl and GPIO driver" depends on ARCH_STARFIVE || COMPILE_TEST
drivers/pinctrl/starfive/Makefile +1 -0
@@ -11,6 +11,7 @@ obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_PER0) += pinctrl-starfive-jhb100-per0.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_PER1) += pinctrl-starfive-jhb100-per1.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_PER2) += pinctrl-starfive-jhb100-per2.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_PER2POK) += pinctrl-starfive-jhb100-per2pok.o +obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_PER3) += pinctrl-starfive-jhb100-per3.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_SYS0) += pinctrl-starfive-jhb100-sys0.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_SYS0H) += pinctrl-starfive-jhb100-sys0h.o obj-$(CONFIG_PINCTRL_STARFIVE_JHB100_SYS1) += pinctrl-starfive-jhb100-sys1.o
drivers/pinctrl/starfive/pinctrl-starfive-jhb100-per3.c new file +129 -0
129 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v8 21/22 riscv: dts: starfive: Add JHB100 pinctrl pad number header
In reply to Changhuang LiangAdd the pad number definitions used by the JHB100 pinctrl device tree nodes. The pad numbers are a property of the SoC pin controllers and are only consumed by the StarFive JHB100 device trees.
--- MAINTAINERS | 1 + .../dts/starfive/starfive,jhb100-pinctrl.h | 247 ++++++++++++++++++ 2 files changed, 248 insertions(+) create mode 100644 arch/riscv/boot/dts/starfive/starfive,jhb100-pinctrl.h
MAINTAINERS +1 -0
@@ -25903,6 +25903,7 @@ M: Changhuang Liang <[email protected]> L: [email protected] S: Supported F: arch/riscv/boot/dts/starfive/jhb100* +F: arch/riscv/boot/dts/starfive/starfive,jhb100-pinctrl.h STARFIVE JHB100 EXTERNAL INTERRUPT CONTROLLER DRIVER M: Changhuang Liang <[email protected]>
arch/riscv/boot/dts/starfive/starfive,jhb100-pinctrl.h new file +247 -0
247 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v8 22/22 riscv: dts: starfive: jhb100: Add pinctrl nodes
In reply to Changhuang LiangAdd pinctrl nodes for starfive JHB100 SoC. They contain pinctrl_per0/pinctrl_per1/pinctrl_per2/pinctrl_per2pok/pinctrl_per3/ pinctrl_sys0/pinctrl_sys0h/pinctrl_sys1/pinctrl_sys2.
Simultaneously add the pinctrl reference for uart6.
--- arch/riscv/boot/dts/starfive/jhb100-evb1.dts | 3 + .../boot/dts/starfive/jhb100-pinctrl.dtsi | 23 ++++ arch/riscv/boot/dts/starfive/jhb100.dtsi | 107 ++++++++++++++++++ 3 files changed, 133 insertions(+) create mode 100644 arch/riscv/boot/dts/starfive/jhb100-pinctrl.dtsi
arch/riscv/boot/dts/starfive/jhb100-evb1.dts +3 -0
@@ -4,6 +4,7 @@ */ #include "jhb100.dtsi" +#include "jhb100-pinctrl.dtsi" / { model = "StarFive JHB100 EVB-1";
@@ -29,4 +30,6 @@ memory@40000000 { &uart6 { status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&uart6_pins>; };
arch/riscv/boot/dts/starfive/jhb100-pinctrl.dtsi new file +23 -0
@@ -0,0 +1,23 @@ +// SPDX-License-Identifier: GPL-2.0 OR MIT +/* + * Copyright (c) 2025-2026 StarFive Technology Co., Ltd. + */ + +#include "starfive,jhb100-pinctrl.h" + +&pinctrl_sys2 { + uart6_pins: uart6-grp { + uart6-tx-pins { + pins = <PADNUM_SYS2_GPIO_A38>; + function = "uart"; + power-source = <3300>; + }; + + uart6-rx-pins { + pins = <PADNUM_SYS2_GPIO_A39>; + function = "uart"; + input-enable; + power-source = <3300>; + }; + }; +};
arch/riscv/boot/dts/starfive/jhb100.dtsi +107 -0
137 lines not on this page · raw message
Signature · 1 line
2.25.1
Linus Walleij
maintainerHi Changuang,
Quoted 13 lines · Changhuang Liang
Changhuang Liang (22):
dt-bindings: pincfg-node: Add property 'input-debounce-ns'
pinctrl: pinconf-generic: Add property 'input-debounce-ns'
dt-bindings: pinctrl: Add starfive,jhb100-sys0-pinctrl
pinctrl: starfive: Add StarFive JHB100 sys0 controller driver
dt-bindings: pinctrl: Add starfive,jhb100-sys0h-pinctrl
pinctrl: starfive: Add StarFive JHB100 sys0h controller driver
dt-bindings: pinctrl: Add starfive,jhb100-sys1-pinctrl
pinctrl: starfive: Add StarFive JHB100 sys1 controller driver
dt-bindings: pinctrl: Add starfive,jhb100-sys2-pinctrl
pinctrl: starfive: Add StarFive JHB100 sys2 controller driver
dt-bindings: pinctrl: Add starfive,jhb100-per0-pinctrl
pinctrl: starfive: Add StarFive JHB100 per0 controller driver
Quoted 8 lines
dt-bindings: pinctrl: Add starfive,jhb100-per1-pinctrl
pinctrl: starfive: Add StarFive JHB100 per1 controller driver
dt-bindings: pinctrl: Add starfive,jhb100-per2-pinctrl
pinctrl: starfive: Add StarFive JHB100 per2 controller driver
dt-bindings: pinctrl: Add starfive,jhb100-per2pok-pinctrl
pinctrl: starfive: Add StarFive JHB100 per2pok controller driver
dt-bindings: pinctrl: Add starfive,jhb100-per3-pinctrl
pinctrl: starfive: Add StarFive JHB100 per3 controller driver
All of those applied to the pinctrl tree!
I had to manually adjust the MAINTAINERS patch because it is based on some reset controller patch I don't have in v7.3-rc1.
Quoted 2 lines
riscv: dts: starfive: Add JHB100 pinctrl pad number header
riscv: dts: starfive: jhb100: Add pinctrl nodes
Please funnel these through the SoC tree.
Yours,
Linus Walleij
Conor Dooley
maintainerQuoted 27 lines · Linus Walleij
Hi Changuang,
Quoted 13 lines · Changhuang Liang
Changhuang Liang (22):
dt-bindings: pincfg-node: Add property 'input-debounce-ns'
pinctrl: pinconf-generic: Add property 'input-debounce-ns'
dt-bindings: pinctrl: Add starfive,jhb100-sys0-pinctrl
pinctrl: starfive: Add StarFive JHB100 sys0 controller driver
dt-bindings: pinctrl: Add starfive,jhb100-sys0h-pinctrl
pinctrl: starfive: Add StarFive JHB100 sys0h controller driver
dt-bindings: pinctrl: Add starfive,jhb100-sys1-pinctrl
pinctrl: starfive: Add StarFive JHB100 sys1 controller driver
dt-bindings: pinctrl: Add starfive,jhb100-sys2-pinctrl
pinctrl: starfive: Add StarFive JHB100 sys2 controller driver
dt-bindings: pinctrl: Add starfive,jhb100-per0-pinctrl
pinctrl: starfive: Add StarFive JHB100 per0 controller driverQuoted 8 lines
dt-bindings: pinctrl: Add starfive,jhb100-per1-pinctrl
pinctrl: starfive: Add StarFive JHB100 per1 controller driver
dt-bindings: pinctrl: Add starfive,jhb100-per2-pinctrl
pinctrl: starfive: Add StarFive JHB100 per2 controller driver
dt-bindings: pinctrl: Add starfive,jhb100-per2pok-pinctrl
pinctrl: starfive: Add StarFive JHB100 per2pok controller driver
dt-bindings: pinctrl: Add starfive,jhb100-per3-pinctrl
pinctrl: starfive: Add StarFive JHB100 per3 controller driver
Quoted 4 lines
All of those applied to the pinctrl tree!
I had to manually adjust the
MAINTAINERSpatch because it is based on some reset controller patch I don't have in v7.3-rc1.
I believe that patch doesn't exist anywhere other than on the mailing list :p
Quoted 4 lines
Quoted 2 lines
riscv: dts: starfive: Add JHB100 pinctrl pad number header
riscv: dts: starfive: jhb100: Add pinctrl nodesPlease funnel these through the SoC tree.
Ye, I got my eye on them, don't worry.
btw, are you going to be at LPC or OSS Linus? I'll have to make sure to say hi if so.
Linus Walleij
maintainerQuoted 2 lines · Conor Dooley
btw, are you going to be at LPC or OSS Linus? I'll have to make sure to say hi if so.
Sadly no, not much conferencing for me for the moment.
Yours,
Linus Walleij
This series was applied to riscv/linux.git (fixes) by Linus Walleij <[email protected]>:
Hello:
This series was applied to riscv/linux.git (fixes) by Linus Walleij <[email protected]>:
Quoted 8 lines · On Thu, 10 Sep 2026 03:03:35 -0700 you wrote:
The JHB100 SoC has 13 pinctrl domains - sys0, sys0h, sys1, sys2, per0, per1, per2, per2pok, per3, adc0, adc1, emmc, and vga.
In the current series, we will only add the following pinctrl:
- sys0, sys0h, sys1, sys2
- per0, per1, per2, per2pok, per3[...]
Here is the summary with links:
- [v8,01/22] dt-bindings: pincfg-node: Add property 'input-debounce-ns'
https://git.kernel.org/riscv/c/5dde08ea70b9 - [v8,02/22] pinctrl: pinconf-generic: Add property 'input-debounce-ns' (no matching commit) - [v8,03/22] dt-bindings: pinctrl: Add starfive,jhb100-sys0-pinctrl https://git.kernel.org/riscv/c/9d3dc8decb60 - [v8,04/22] pinctrl: starfive: Add StarFive JHB100 sys0 controller driver (no matching commit) - [v8,05/22] dt-bindings: pinctrl: Add starfive,jhb100-sys0h-pinctrl https://git.kernel.org/riscv/c/6701c1c00891 - [v8,06/22] pinctrl: starfive: Add StarFive JHB100 sys0h controller driver (no matching commit) - [v8,07/22] dt-bindings: pinctrl: Add starfive,jhb100-sys1-pinctrl https://git.kernel.org/riscv/c/bf8241062c79 - [v8,08/22] pinctrl: starfive: Add StarFive JHB100 sys1 controller driver https://git.kernel.org/riscv/c/1d5c13990916 - [v8,09/22] dt-bindings: pinctrl: Add starfive,jhb100-sys2-pinctrl https://git.kernel.org/riscv/c/941cc8022c21 - [v8,10/22] pinctrl: starfive: Add StarFive JHB100 sys2 controller driver https://git.kernel.org/riscv/c/594deb7f74f4 - [v8,11/22] dt-bindings: pinctrl: Add starfive,jhb100-per0-pinctrl https://git.kernel.org/riscv/c/402323de0c04 - [v8,12/22] pinctrl: starfive: Add StarFive JHB100 per0 controller driver (no matching commit) - [v8,13/22] dt-bindings: pinctrl: Add starfive,jhb100-per1-pinctrl https://git.kernel.org/riscv/c/d6001140c2e8 - [v8,14/22] pinctrl: starfive: Add StarFive JHB100 per1 controller driver (no matching commit) - [v8,15/22] dt-bindings: pinctrl: Add starfive,jhb100-per2-pinctrl https://git.kernel.org/riscv/c/b598855cc302 - [v8,16/22] pinctrl: starfive: Add StarFive JHB100 per2 controller driver (no matching commit) - [v8,17/22] dt-bindings: pinctrl: Add starfive,jhb100-per2pok-pinctrl https://git.kernel.org/riscv/c/c9ed9daba98a - [v8,18/22] pinctrl: starfive: Add StarFive JHB100 per2pok controller driver (no matching commit) - [v8,19/22] dt-bindings: pinctrl: Add starfive,jhb100-per3-pinctrl https://git.kernel.org/riscv/c/340588f9b94c
- [v8,20/22] pinctrl: starfive: Add StarFive JHB100 per3 controller driver (no matching commit)
- [v8,21/22] riscv: dts: starfive: Add JHB100 pinctrl pad number header (no matching commit)
- [v8,22/22] riscv: dts: starfive: jhb100: Add pinctrl nodes (no matching commit)
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html