Skip to contentSkip to conversation

Add pinctrl support for Sky1

PATCH Superseded Gary Yang 3 participants 11 messages Oct 14, 2025 – Oct 17, 2025

Subsystems (4)

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Gary Yang

author maintainer
#0 lore raw

v3 cover Add pinctrl support for Sky1

Patch 1: Add dt-binding doc for pinctrl on Sky1
Patch 2: Add pin-controller driver for sky1
Patch 3: Add pinctrl nodes for sky1

Changes for v3:
- Pass dts build check with below commands:
make O=$OUTKNL dt_binding_check
make O=$OUTKNL dt_binding_check DT_SCHEMA_FILES=cix,sky1-pinctrl.yaml scripts/checkpatch.pl 000*.patch
make O=$OUTKNL CHECK_DTBS=y W=1 cix/sky1-orion-o6.dtb
- Re-order the patch set, and move dt-bindings to the 1st patch.
- Refine the pinctrl driver with SKY_PINFUNCTION macro
- Fix warnings when make dt_binding_check

Changes for v2:
- restructure the pinctrl driver to support pinmux=<..>
- redefine pinmux macros
- move header file from dt-bindings to dts
- fix the code-style issues

Gary Yang (3):
dt-bindings: pinctrl: Add cix,sky1-pinctrl
pinctrl: cix: Add pin-controller support for sky1
arm64: dts: cix: Add pinctrl nodes for sky1

 .../bindings/pinctrl/cix,sky1-pinctrl.yaml    |  84 +++
 arch/arm64/boot/dts/cix/sky1-orion-o6.dts     |  32 +
 arch/arm64/boot/dts/cix/sky1-pinfunc.h        | 417 +++++++++++++
 arch/arm64/boot/dts/cix/sky1.dtsi             |  10 +
 drivers/pinctrl/Kconfig                       |   1 +
 drivers/pinctrl/Makefile                      |   1 +
 drivers/pinctrl/cix/Kconfig                   |  14 +
 drivers/pinctrl/cix/Makefile                  |   4 +
 drivers/pinctrl/cix/pinctrl-sky1-base.c       | 558 +++++++++++++++++
 drivers/pinctrl/cix/pinctrl-sky1.c            | 559 ++++++++++++++++++
 drivers/pinctrl/cix/pinctrl-sky1.h            |  48 ++
 11 files changed, 1728 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/cix,sky1-pinctrl.yaml
 create mode 100644 arch/arm64/boot/dts/cix/sky1-pinfunc.h
 create mode 100644 drivers/pinctrl/cix/Kconfig
 create mode 100644 drivers/pinctrl/cix/Makefile
 create mode 100644 drivers/pinctrl/cix/pinctrl-sky1-base.c
 create mode 100644 drivers/pinctrl/cix/pinctrl-sky1.c
 create mode 100644 drivers/pinctrl/cix/pinctrl-sky1.h
Signature · 1 line
2.49.0
author maintainer
#1 lore raw

PATCH v3 1/3 dt-bindings: pinctrl: Add cix,sky1-pinctrl

The pin-controller is used to control the Soc pins. There are two pin-controllers on Cix Sky1 platform. One is used under S0 state, the other is used under S0 and S5 state.

---
 .../bindings/pinctrl/cix,sky1-pinctrl.yaml    | 84 +++++++++++++++++++
 1 file changed, 84 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/cix,sky1-pinctrl.yaml
Documentation/devicetree/bindings/pinctrl/cix,sky1-pinctrl.yaml new file +84 -0
new file mode 100644
index 000000000000..6c83eb47f974
@@ -0,0 +1,84 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/cix,sky1-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cix Sky1 Pin Controller
+
+maintainers:
+  - Gary Yang <[email protected]>
+
+description:
+  The pin-controller is used to control Soc pins. There are two pin-controllers
+  on Cix Sky1 platform. one is used under S0 state, the other one is used under
+  S0 and S5 state.
+
+properties:
+  compatible:
+    enum:
+      - cix,sky1-iomuxc
+      - cix,sky1-iomuxc-s5
+
+  reg:
+    items:
+      - description: gpio base
+
+required:
+  - compatible
+  - reg
+
+# Client device subnode's properties
+patternProperties:
+  'pins$':
+    type: object
+    additionalProperties: false
+    patternProperties:
+      '(^pins|pins?$)':
+        type: object
+        additionalProperties: false
+        description:
+          A pinctrl node should contain at least one subnodes representing the
+          pinctrl groups available on the machine. Each subnode will list the
+          pins it needs, and how they should be configured, with regard to muxer
+          configuration, pullups, and drive strength.
+
+        properties:
+          pinmux:
+            description:
+              Values are constructed from pin number and mux setting and are
+              defined as macros in arch/arm64/boot/dts/cix/sky1-pinfunc.h directly.
+
+          bias-disable: true
+
+          bias-pull-up: true
+
+          bias-pull-down: true
+
+          drive-strength:
+            description:
+              Can support 15 levels, from DS_LEVEL1 to DS_LEVEL15.
+              defined as macros in arch/arm64/boot/dts/cix/sky1-pinfunc.h.
+
+        required:
+          - pinmux
+
+additionalProperties: false
+
+examples:
+  # Pinmux controller node
+  - |
+    #define CIX_PAD_GPIO012_FUNC_GPIO012 (11 << 8 | 0x0)
+    #define DS_LEVEL4 (4)
+    iomuxc: pinctrl@4170000 {
+        compatible = "cix,sky1-iomuxc";
+        reg = <0x4170000 0x1000>;
+
+        wifi_vbat_gpio: wifi-vbat-gpio-pins {
+            pins {
+                pinmux = <CIX_PAD_GPIO012_FUNC_GPIO012>;
+                bias-pull-up;
+                drive-strength = <DS_LEVEL4>;
+           };
+        };
+    };
Signature · 1 line
2.49.0
#2 lore raw

Re: [PATCH v3 1/3] dt-bindings: pinctrl: Add cix,sky1-pinctrl

Hi Gary,

thanks for your patch!

Quoted 24 lines · Gary Yang
Documentation/devicetree/bindings/pinctrl/cix,sky1-pinctrl.yaml new file +24 -0
+# Client device subnode's properties
+patternProperties:
+  'pins$':
+    type: object
+    additionalProperties: false
+    patternProperties:
+      '(^pins|pins?$)':
+        type: object
+        additionalProperties: false
+        description:
+          A pinctrl node should contain at least one subnodes representing the
+          pinctrl groups available on the machine. Each subnode will list the
+          pins it needs, and how they should be configured, with regard to muxer
+          configuration, pullups, and drive strength.
+
+        properties:
+          pinmux:
+            description:
+              Values are constructed from pin number and mux setting and are
+              defined as macros in arch/arm64/boot/dts/cix/sky1-pinfunc.h directly.
+
+          bias-disable: true
+
+          bias-pull-up: true

Documentation/devicetree/bindings/pinctrl/cix,sky1-pinctrl.yaml line 64

Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/cix,sky1-pinctrl.yaml new file +10 -0
+
+          bias-pull-down: true
+
+          drive-strength:
+            description:
+              Can support 15 levels, from DS_LEVEL1 to DS_LEVEL15.
+              defined as macros in arch/arm64/boot/dts/cix/sky1-pinfunc.h.
+
+        required:
+          - pinmux

Can't you just include both pinmux-node.yaml and pincfg-node.yaml to get validation from the generic schemas?

'pins$':
type: object
additionalProperties: false
patternProperties:

    '(^pins|pins?$)':
      type: object
      $ref: /schemas/pinctrl/pinmux-node.yaml
      $ref: /schemas/pinctrl/pincfg-node.yaml
      additionalProperties: false

Something like this, I never get this right before actually testcompiling...

Yours,
Linus Walleij

#3 lore raw

Re: [PATCH v3 1/3] dt-bindings: pinctrl: Add cix,sky1-pinctrl

Quoted 30 lines · Linus Walleij

Hi Gary,

thanks for your patch!

Quoted 23 lines · Gary Yang
Documentation/devicetree/bindings/pinctrl/cix,sky1-pinctrl.yaml new file +23 -0
+# Client device subnode's properties
+patternProperties:
+  'pins$':
+    type: object
+    additionalProperties: false
+    patternProperties:
+      '(^pins|pins?$)':
+        type: object
+        additionalProperties: false
+        description:
+          A pinctrl node should contain at least one subnodes representing the
+          pinctrl groups available on the machine. Each subnode will list the
+          pins it needs, and how they should be configured, with regard to muxer
+          configuration, pullups, and drive strength.
+
+        properties:
+          pinmux:
+            description:
+              Values are constructed from pin number and mux setting and are
+              defined as macros in arch/arm64/boot/dts/cix/sky1-pinfunc.h directly.
+
+          bias-disable: true
+
Quoted 8 lines

Documentation/devicetree/bindings/pinctrl/cix,sky1-pinctrl.yaml line 61

Quoted 8 lines
Documentation/devicetree/bindings/pinctrl/cix,sky1-pinctrl.yaml new file +8 -0
+          bias-pull-up: true
+
+          bias-pull-down: true
+
+          drive-strength:
+            description:
+              Can support 15 levels, from DS_LEVEL1 to DS_LEVEL15.
+              defined as macros in arch/arm64/boot/dts/cix/sky1-pinfunc.h.

Isn't this wrong?
drive-strength is in mA but you're just shoving register values in here.
pw-bot: changes-requested

Quoted 4 lines

Documentation/devicetree/bindings/pinctrl/cix,sky1-pinctrl.yaml line 64

Quoted 3 lines
Documentation/devicetree/bindings/pinctrl/cix,sky1-pinctrl.yaml new file +3 -0
+
+        required:
+          - pinmux
Quoted 8 lines

Can't you just include both pinmux-node.yaml and pincfg-node.yaml to get validation from the generic schemas?

'pins$':
type: object
additionalProperties: false
patternProperties:

    '(^pins|pins?$)':

Why does this pattern allow foopin but not pinfoo?
Also seems overkill to have both suffix and prefix options, instead of just sticking to one!

Quoted 6 lines

type: object
$ref: /schemas/pinctrl/pinmux-node.yaml
$ref: /schemas/pinctrl/pincfg-node.yaml
additionalProperties: false

Something like this, I never get this right before actually testcompiling...

spacemit,k1-pinctrl has a node of this type, that can be copied from Gary. Essentially, you need an allOf: for the two references.

#4 lore raw

Re: [PATCH v3 1/3] dt-bindings: pinctrl: Add cix,sky1-pinctrl

Quoted 4 lines · Conor Dooley
Quoted 4 lines

Documentation/devicetree/bindings/pinctrl/cix,sky1-pinctrl.yaml line 61

Quoted 4 lines
Documentation/devicetree/bindings/pinctrl/cix,sky1-pinctrl.yaml new file +4 -0
+          drive-strength:
+            description:
+              Can support 15 levels, from DS_LEVEL1 to DS_LEVEL15.
+              defined as macros in arch/arm64/boot/dts/cix/sky1-pinfunc.h.

(side note to Gary: drop the reference to the arch/arm64 etc sky1-pinfunc.h file,
this is Linux-specific and U-Boot and BSD will be confused)

Quoted 3 lines

Isn't this wrong?
drive-strength is in mA but you're just shoving register values in here.
pw-bot: changes-requested

That's right, Gary do you think you can add a mA->strength value translation table into the driver and let this be configured in mA?

Quoted 9 lines
Quoted 6 lines

type: object
$ref: /schemas/pinctrl/pinmux-node.yaml
$ref: /schemas/pinctrl/pincfg-node.yaml
additionalProperties: false

Something like this, I never get this right before actually testcompiling...

spacemit,k1-pinctrl has a node of this type, that can be copied from Gary. Essentially, you need an allOf: for the two references.

Neat, thanks Conor!

Yours,
Linus Walleij

author maintainer
#5 lore raw

PATCH v3 2/3 pinctrl: cix: Add pin-controller support for sky1

In reply to Gary Yang

There are two pin-controllers on Cix Sky1 platform.
one is used under S0 state, the other is used under S0 and S5 state.

---
 drivers/pinctrl/Kconfig                 |   1 +
 drivers/pinctrl/Makefile                |   1 +
 drivers/pinctrl/cix/Kconfig             |  14 +
 drivers/pinctrl/cix/Makefile            |   4 +
 drivers/pinctrl/cix/pinctrl-sky1-base.c | 558 +++++++++++++++++++++++
 drivers/pinctrl/cix/pinctrl-sky1.c      | 559 ++++++++++++++++++++++++
 drivers/pinctrl/cix/pinctrl-sky1.h      |  48 ++
 7 files changed, 1185 insertions(+)
 create mode 100644 drivers/pinctrl/cix/Kconfig
 create mode 100644 drivers/pinctrl/cix/Makefile
 create mode 100644 drivers/pinctrl/cix/pinctrl-sky1-base.c
 create mode 100644 drivers/pinctrl/cix/pinctrl-sky1.c
 create mode 100644 drivers/pinctrl/cix/pinctrl-sky1.h
drivers/pinctrl/Kconfig +1 -0
index ddd11668457c..a5b7177be115 100644
@@ -653,6 +653,7 @@ source "drivers/pinctrl/aspeed/Kconfig"
 source "drivers/pinctrl/bcm/Kconfig"
 source "drivers/pinctrl/berlin/Kconfig"
 source "drivers/pinctrl/cirrus/Kconfig"
+source "drivers/pinctrl/cix/Kconfig"
 source "drivers/pinctrl/freescale/Kconfig"
 source "drivers/pinctrl/intel/Kconfig"
 source "drivers/pinctrl/mediatek/Kconfig"
drivers/pinctrl/Makefile +1 -0
index 909ab89a56d2..8f353fc38e0e 100644
@@ -67,6 +67,7 @@ obj-$(CONFIG_ARCH_ASPEED)	+= aspeed/
 obj-y				+= bcm/
 obj-$(CONFIG_PINCTRL_BERLIN)	+= berlin/
 obj-y				+= cirrus/
+obj-y				+= cix/
 obj-y				+= freescale/
 obj-$(CONFIG_X86)		+= intel/
 obj-y				+= mediatek/
drivers/pinctrl/cix/Kconfig new file +14 -0
new file mode 100644
index 000000000000..42e064b6e7a2
@@ -0,0 +1,14 @@
+# SPDX-License-Identifier: GPL-2.0-only
+config PINCTRL_SKY1_BASE
+	tristate
+	select GENERIC_PINCTRL_GROUPS
+	select GENERIC_PINMUX_FUNCTIONS
+	select GENERIC_PINCONF
+	select REGMAP
+
+config PINCTRL_SKY1
+	tristate "Cix Sky1 pinctrl driver"
+	depends on ARCH_CIX
+	select PINCTRL_SKY1_BASE
+	help
+	  Say Y here to enable the sky1 pinctrl driver
drivers/pinctrl/cix/Makefile new file +4 -0
new file mode 100644
index 000000000000..22685d6a107b
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
+# Cix Sky1 pin control drivers
+obj-$(CONFIG_PINCTRL_SKY1_BASE)	+= pinctrl-sky1-base.o
+obj-$(CONFIG_PINCTRL_SKY1)	+= pinctrl-sky1.o
drivers/pinctrl/cix/pinctrl-sky1-base.c new file +558 -0

558 lines not on this page · raw message

drivers/pinctrl/cix/pinctrl-sky1.c new file +559 -0

559 lines not on this page · raw message

drivers/pinctrl/cix/pinctrl-sky1.h new file +48 -0

48 lines not on this page · raw message

Signature · 1 line
2.49.0
#6 lore raw

Re: [PATCH v3 2/3] pinctrl: cix: Add pin-controller support for sky1

Hi Gary,

this looks very nice, as long as we finish the bindings we can soon merge this I hope.

Some small comments!

Quoted 4 lines · Gary Yang

There are two pin-controllers on Cix Sky1 platform.
one is used under S0 state, the other is used under S0 and S5 state.

(...)

drivers/pinctrl/cix/Kconfig line 11

Quoted 3 lines
drivers/pinctrl/cix/Kconfig new file +3 -0
+config PINCTRL_SKY1
+       tristate "Cix Sky1 pinctrl driver"
+       depends on ARCH_CIX

Maybe depends on ARCH_CIX || COMPILE_TEST so we get some compile testing in the test farms and also a test on the rest of the dependencies.

(Makes the bots complain so we can fix all such things!)

drivers/pinctrl/cix/pinctrl-sky1-base.c line 14

Quoted 9 lines
drivers/pinctrl/cix/pinctrl-sky1-base.c new file +9 -0
+#include <linux/device.h>
+#include <linux/err.h>
+#include <linux/init.h>
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+#include <linux/of_address.h>
+#include <linux/pinctrl/machine.h>

Do you really need <linux/pinctrl/machine.h>?

Another thing you might want to consider is whether the designware GPIO will use this pin controller as "back-end" for the GPIOs using gpio-ranges in the GPIO controller nodes, for example (I just made this up):

gpio-ranges = <&pinctrl1 0 20 10>, <&pinctrl2 10 50 20>;

Then you might want to implement the GPIO accelerator operations in struct pinmux_ops, i.e. these:

* @gpio_request_enable: requests and enables GPIO on a certain pin.

 *      Implement this only if you can mux every pin individually as GPIO. The
 *      affected GPIO range is passed along with an offset(pin number) into that
 *      specific GPIO range - function selectors and pin groups are orthogonal
 *      to this, the core will however make sure the pins do not collide.
 * @gpio_disable_free: free up GPIO muxing on a certain pin, the reverse of
 *      @gpio_request_enable
 * @gpio_set_direction: Since controllers may need different configurations
 *      depending on whether the GPIO is configured as input or output,
 *      a direction selector function may be implemented as a backing
 *      to the GPIO controllers that need pin muxing.

* @strict: do not allow simultaneous use of the same pin for GPIO and another
* function. Check both gpio_owner and mux_owner strictly before approving
* the pin request.

And nowadays it is also worth considering using:

bool (*function_is_gpio) (struct pinctrl_dev *pctldev,
unsigned int selector);

To make the pinctrl core awara of a certain function selector being the GPIO function (which makes the accelerated functions work much better with the strict mode).

This can all be added later in separate patches, but this is a good time to make sure nothing stands in the way of doing this.

Yours,
Linus Walleij

author maintainer
#7 lore raw

回复: [PATCH v3 2/3] pinctrl: cix: Add pin-controller support for sky1

Hi Linus:

Thanks for your comments

Quoted 19 lines

EXTERNAL EMAIL

Hi Gary,

this looks very nice, as long as we finish the bindings we can soon merge this I hope.

Some small comments!

Quoted 4 lines · Gary Yang

There are two pin-controllers on Cix Sky1 platform.
one is used under S0 state, the other is used under S0 and S5 state.

(...)

Quoted 9 lines

drivers/pinctrl/cix/Kconfig line 11

Quoted 3 lines
drivers/pinctrl/cix/Kconfig new file +3 -0
+config PINCTRL_SKY1
+       tristate "Cix Sky1 pinctrl driver"
+       depends on ARCH_CIX

Maybe depends on ARCH_CIX || COMPILE_TEST so we get some compile testing in the test farms and also a test on the rest of the dependencies.

(Makes the bots complain so we can fix all such things!)

OK, we will add COMPILE_TEST in next version.

Quoted 12 lines

drivers/pinctrl/cix/pinctrl-sky1-base.c line 14

Quoted 9 lines
drivers/pinctrl/cix/pinctrl-sky1-base.c new file +9 -0
+#include <linux/device.h>
+#include <linux/err.h>
+#include <linux/init.h>
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+#include <linux/of_address.h>
+#include <linux/pinctrl/machine.h>

Do you really need <linux/pinctrl/machine.h>?

Yes, You‘re right, it is a legacy issue. We will remove it next version

Quoted 34 lines

Another thing you might want to consider is whether the designware GPIO will use this pin controller as "back-end" for the GPIOs using gpio-ranges in the GPIO controller nodes, for example (I just made this up):

gpio-ranges = <&pinctrl1 0 20 10>, <&pinctrl2 10 50 20>;

Then you might want to implement the GPIO accelerator operations in struct pinmux_ops, i.e. these:

* @gpio_request_enable: requests and enables GPIO on a certain pin.
* Implement this only if you can mux every pin individually as GPIO.
The
* affected GPIO range is passed along with an offset(pin number) into
that
* specific GPIO range - function selectors and pin groups are
orthogonal
* to this, the core will however make sure the pins do not collide.
* @gpio_disable_free: free up GPIO muxing on a certain pin, the reverse of
* @gpio_request_enable
* @gpio_set_direction: Since controllers may need different configurations

 *      depending on whether the GPIO is configured as input or output,
 *      a direction selector function may be implemented as a backing
 *      to the GPIO controllers that need pin muxing.

* @strict: do not allow simultaneous use of the same pin for GPIO and
another
* function. Check both gpio_owner and mux_owner strictly before
approving
* the pin request.

And nowadays it is also worth considering using:

bool (*function_is_gpio) (struct pinctrl_dev *pctldev,
unsigned int selector);

Quoted 7 lines

To make the pinctrl core awara of a certain function selector being the GPIO function (which makes the accelerated functions work much better with the strict mode).

This can all be added later in separate patches, but this is a good time to make sure nothing stands in the way of doing this.

GPIO IP on Sky1 is Cadence, not Synopsys designware. We wants to do it when upstream GPIO driver in the future. Are you agree?

Quoted 2 lines

Yours,
Linus Walleij

Best wishes
Gary

#8 lore raw

Re: [PATCH v3 2/3] pinctrl: cix: Add pin-controller support for sky1

Quoted 3 lines · Gary Yang

GPIO IP on Sky1 is Cadence, not Synopsys designware. We wants to do it when upstream GPIO driver in the future.
Are you agree?

Yes no problem. (I misremembered that it was Cadence, not Synopsys...)

When I look at the Cadence driver I see it needs some modifications if it should work properly with GPIO ranges and interoperate with pin controllers. It needs to call gpiochip_generic_request() and gpiochip_generic_free() from its request/free functions, and preferably also gpiochip_generic_config() which will extend the gpiolib to call down to the pin controller and take control over line properties.

But let's do that in a separate patch!

Yours,
Linus Walleij

author maintainer
#9 lore raw

回复: [PATCH v3 2/3] pinctrl: cix: Add pin-controller support for sky1

Hi Linus,

I'm glad to see your kind comments

Quoted 11 lines

EXTERNAL EMAIL

Quoted 3 lines · Gary Yang

GPIO IP on Sky1 is Cadence, not Synopsys designware. We wants to do it when upstream GPIO driver in the future.
Are you agree?

Yes no problem. (I misremembered that it was Cadence, not Synopsys...)

Quoted 9 lines

When I look at the Cadence driver I see it needs some modifications if it should work properly with GPIO ranges and interoperate with pin controllers. It needs to call gpiochip_generic_request() and
gpiochip_generic_free() from its request/free functions, and preferably also gpiochip_generic_config() which will extend the gpiolib to call down to the pin controller and take control over line properties.

But let's do that in a separate patch!

Thanks for your remind and understandings. We need focus on modifying dt-bindings file, and

hope merge pinctrl driver as soon as possible. We will take it consider when upstream GPIO driver later.

Quoted 2 lines

Yours,
Linus Walleij

Best wishes
Gary

author maintainer
#10 lore raw

PATCH v3 3/3 arm64: dts: cix: Add pinctrl nodes for sky1

In reply to Gary Yang

Add the pin-controller nodes for Sky1 platform.

---
 arch/arm64/boot/dts/cix/sky1-orion-o6.dts |  32 ++
 arch/arm64/boot/dts/cix/sky1-pinfunc.h    | 417 ++++++++++++++++++++++
 arch/arm64/boot/dts/cix/sky1.dtsi         |  10 +
 3 files changed, 459 insertions(+)
 create mode 100644 arch/arm64/boot/dts/cix/sky1-pinfunc.h
arch/arm64/boot/dts/cix/sky1-orion-o6.dts +32 -0
index d74964d53c3b..a35a15471a1d 100644
@@ -7,6 +7,8 @@
 /dts-v1/;
 
 #include "sky1.dtsi"
+#include "sky1-pinfunc.h"
+
 / {
 	model = "Radxa Orion O6";
 	compatible = "radxa,orion-o6", "cix,sky1";
@@ -34,6 +36,36 @@ linux,cma {
 
 };
 
+&iomuxc {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_hog>;
+
+	pinctrl_hog: hog-pins {
+		pins {
+			pinmux = <CIX_PAD_GPIO144_FUNC_GPIO144>,
+				<CIX_PAD_GPIO145_FUNC_GPIO145>,
+				<CIX_PAD_GPIO146_FUNC_GPIO146>,
+				<CIX_PAD_GPIO147_FUNC_GPIO147>;
+			bias-pull-down;
+			drive-strength = <DS_LEVEL4>;
+		};
+	};
+};
+
+&iomuxc_s5 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_hog_s5>;
+
+	pinctrl_hog_s5: hog-s5-pins {
+		pins {
+			pinmux = <CIX_PAD_GPIO014_FUNC_GPIO014>;
+			bias-pull-up;
+			drive-strength = <DS_LEVEL4>;
+
+		};
+	};
+};
+
 &uart2 {
 	status = "okay";
 };
arch/arm64/boot/dts/cix/sky1-pinfunc.h new file +417 -0

417 lines not on this page · raw message

arch/arm64/boot/dts/cix/sky1.dtsi +10 -0
index 7dfe7677e649..4c6f25fe797c 100644
@@ -228,6 +228,11 @@ uart3: serial@40e0000 {
 			status = "disabled";
 		};
 
+		iomuxc: pinctrl@4170000 {
+			compatible = "cix,sky1-iomuxc";
+			reg = <0x0 0x04170000 0x0 0x1000>;
+		};
+
 		mbox_ap2se: mailbox@5060000 {
 			compatible = "cix,sky1-mbox";
 			reg = <0x0 0x05060000 0x0 0x10000>;
@@ -316,6 +321,11 @@ ppi_partition1: interrupt-partition-1 {
 				};
 			};
 		};
+
+		iomuxc_s5: pinctrl@16007000 {
+			compatible = "cix,sky1-iomuxc-s5";
+			reg = <0x0 0x16007000 0x0 0x1000>;
+		};
 	};
 
 	timer {
Signature · 1 line
2.49.0