[PATCH v2 1/3] dt-bindings: pinctrl: spacemit: add K3 SoC support

Yixun Lan posted 3 patches 1 month, 1 week ago
There is a newer version of this series
[PATCH v2 1/3] dt-bindings: pinctrl: spacemit: add K3 SoC support
Posted by Yixun Lan 1 month, 1 week ago
Add new compatible string for SpacemiT K3 SoC, the pinctrl IP shares
almost same logic with previous K1 generation, but has different register
offset and pin configuration, for example the drive strength and
schmitter trigger settings has been changed.

Signed-off-by: Yixun Lan <dlan@gentoo.org>
---
 .../devicetree/bindings/pinctrl/spacemit,k1-pinctrl.yaml     | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/spacemit,k1-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/spacemit,k1-pinctrl.yaml
index d80e88aa07b4..d2cb994e30c1 100644
--- a/Documentation/devicetree/bindings/pinctrl/spacemit,k1-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/spacemit,k1-pinctrl.yaml
@@ -11,7 +11,9 @@ maintainers:
 
 properties:
   compatible:
-    const: spacemit,k1-pinctrl
+    enum:
+      - spacemit,k1-pinctrl
+      - spacemit,k3-pinctrl
 
   reg:
     items:
@@ -74,8 +76,12 @@ patternProperties:
           drive-strength:
             description: |
               typical current when output high level.
-              1.8V output: 11, 21, 32, 42 (mA)
-              3.3V output: 7, 10, 13, 16, 19, 23, 26, 29 (mA)
+              For K1 SoC, the settings show as below:
+                1.8V output: 11, 21, 32, 42 (mA)
+                3.3V output: 7, 10, 13, 16, 19, 23, 26, 29 (mA)
+              For K3 SoC, the settings show as below:
+                1.8V output: 2, 4, 6, 7, 9, 11, 13, 14, 21, 23, 25, 26, 28, 30, 31, 33 (mA)
+                3.3V output: 3, 5, 7, 9, 11, 13, 15, 17, 25, 27, 29, 31, 33, 35, 37, 38 (mA)
 
           input-schmitt:
             description: |

-- 
2.52.0
Re: [PATCH v2 1/3] dt-bindings: pinctrl: spacemit: add K3 SoC support
Posted by Krzysztof Kozlowski 1 month, 1 week ago
On Fri, Dec 26, 2025 at 08:58:24PM +0800, Yixun Lan wrote:
> Add new compatible string for SpacemiT K3 SoC, the pinctrl IP shares
> almost same logic with previous K1 generation, but has different register
> offset and pin configuration, for example the drive strength and
> schmitter trigger settings has been changed.
> 
> Signed-off-by: Yixun Lan <dlan@gentoo.org>
> ---
>  .../devicetree/bindings/pinctrl/spacemit,k1-pinctrl.yaml     | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/pinctrl/spacemit,k1-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/spacemit,k1-pinctrl.yaml
> index d80e88aa07b4..d2cb994e30c1 100644
> --- a/Documentation/devicetree/bindings/pinctrl/spacemit,k1-pinctrl.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/spacemit,k1-pinctrl.yaml
> @@ -11,7 +11,9 @@ maintainers:
>  
>  properties:
>    compatible:
> -    const: spacemit,k1-pinctrl
> +    enum:
> +      - spacemit,k1-pinctrl
> +      - spacemit,k3-pinctrl
>  
>    reg:
>      items:
> @@ -74,8 +76,12 @@ patternProperties:
>            drive-strength:
>              description: |
>                typical current when output high level.
> -              1.8V output: 11, 21, 32, 42 (mA)
> -              3.3V output: 7, 10, 13, 16, 19, 23, 26, 29 (mA)
> +              For K1 SoC, the settings show as below:
> +                1.8V output: 11, 21, 32, 42 (mA)
> +                3.3V output: 7, 10, 13, 16, 19, 23, 26, 29 (mA)
> +              For K3 SoC, the settings show as below:
> +                1.8V output: 2, 4, 6, 7, 9, 11, 13, 14, 21, 23, 25, 26, 28, 30, 31, 33 (mA)
> +                3.3V output: 3, 5, 7, 9, 11, 13, 15, 17, 25, 27, 29, 31, 33, 35, 37, 38 (mA)

This should be a schema rather than free form text. Add oneOf where each
item is description (1.8 V) + enum. This would be first commit for
converting text to schema for K1, which you grow for K3 in this commit.


Best regards,
Krzysztof