2021-12-09 05:10:15

by Hector Martin

[permalink] [raw]
Subject: [PATCH 0/4] dt-bindings: Add trivial Apple t6000/t6001 SoC bindings

Hi Rob et al,

This series adds trivial DT binding changes (compatibles and some misc
changes) to support Apple's t6000/t6001 SoCs and the devices that use
them. These changes are for devices that need no driver changes to
support these new SoCs. Drivers that need changes (notably AICv2) have
the binding change submitted as part of that series.

The only nontrivial patch is #3 for the PCIe binding, which grew a port.
I tried to set it up so it'll fail validation if you try to have too
many ports on t8103.

I'll be happy to merge this through the Asahi-SoC tree once reviewed :)

Hector Martin (4):
dt-bindings: arm: apple: Add t6000/t6001 MacBook Pro 14/16"
compatibles
dt-bindings: i2c: apple,i2c: Add apple,t6000-i2c compatible
dt-bindings: pci: apple,pcie: Add t6000 support
dt-bindings: pinctrl: apple,pinctrl: Add apple,t6000-pinctrl
compatible

.../devicetree/bindings/arm/apple.yaml | 21 ++++++++++++++
.../devicetree/bindings/i2c/apple,i2c.yaml | 4 ++-
.../devicetree/bindings/pci/apple,pcie.yaml | 28 ++++++++++++++-----
.../bindings/pinctrl/apple,pinctrl.yaml | 4 ++-
4 files changed, 48 insertions(+), 9 deletions(-)

--
2.33.0



2021-12-09 05:10:18

by Hector Martin

[permalink] [raw]
Subject: [PATCH 1/4] dt-bindings: arm: apple: Add t6000/t6001 MacBook Pro 14/16" compatibles

This adds the initial apple,t6000 platforms:

- apple,j314s - MacBook Pro (14-inch, M1 Pro, 2021)
- apple,j316s - MacBook Pro (16-inch, M1 Pro, 2021)

And the initial apple,t6001 platforms:

- apple,j314c - MacBook Pro (14-inch, M1 Max, 2021)
- apple,j316c - MacBook Pro (16-inch, M1 Max, 2021)

Signed-off-by: Hector Martin <[email protected]>
---
.../devicetree/bindings/arm/apple.yaml | 21 +++++++++++++++++++
1 file changed, 21 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/apple.yaml b/Documentation/devicetree/bindings/arm/apple.yaml
index b23c8dc5a27d..8d93e8a6cc18 100644
--- a/Documentation/devicetree/bindings/arm/apple.yaml
+++ b/Documentation/devicetree/bindings/arm/apple.yaml
@@ -19,6 +19,13 @@ description: |
- MacBook Air (M1, 2020)
- iMac (24-inch, M1, 2021)

+ And devices based on the "M1 Pro" and "M1 Max" SoCs:
+
+ - MacBook Pro (14-inch, M1 Pro, 2021)
+ - MacBook Pro (14-inch, M1 Max, 2021)
+ - MacBook Pro (16-inch, M1 Pro, 2021)
+ - MacBook Pro (16-inch, M1 Max, 2021)
+
The compatible property should follow this format:

compatible = "apple,<targettype>", "apple,<socid>", "apple,arm-platform";
@@ -60,6 +67,20 @@ properties:
- apple,j457 # iMac (24-inch, 2x USB-C, M1, 2021)
- const: apple,t8103
- const: apple,arm-platform
+ - description: Apple M1 Pro SoC based platforms
+ items:
+ - enum:
+ - apple,j314s # MacBook Pro (14-inch, M1 Pro, 2021)
+ - apple,j316s # MacBook Pro (16-inch, M1 Pro, 2021)
+ - const: apple,t6000
+ - const: apple,arm-platform
+ - description: Apple M1 Max SoC based platforms
+ items:
+ - enum:
+ - apple,j314c # MacBook Pro (14-inch, M1 Max, 2021)
+ - apple,j316c # MacBook Pro (16-inch, M1 Max, 2021)
+ - const: apple,t6001
+ - const: apple,arm-platform

additionalProperties: true

--
2.33.0


2021-12-09 05:10:21

by Hector Martin

[permalink] [raw]
Subject: [PATCH 2/4] dt-bindings: i2c: apple,i2c: Add apple,t6000-i2c compatible

This block is compatible with t8103, so just add the new per-SoC
compatible under apple,i2c.

Signed-off-by: Hector Martin <[email protected]>
---
Documentation/devicetree/bindings/i2c/apple,i2c.yaml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/i2c/apple,i2c.yaml b/Documentation/devicetree/bindings/i2c/apple,i2c.yaml
index 47dd6c107a6d..4ac61fec90e2 100644
--- a/Documentation/devicetree/bindings/i2c/apple,i2c.yaml
+++ b/Documentation/devicetree/bindings/i2c/apple,i2c.yaml
@@ -21,7 +21,9 @@ allOf:
properties:
compatible:
items:
- - const: apple,t8103-i2c
+ - enum:
+ - apple,t8103-i2c
+ - apple,t6000-i2c
- const: apple,i2c

reg:
--
2.33.0


2021-12-09 05:10:25

by Hector Martin

[permalink] [raw]
Subject: [PATCH 3/4] dt-bindings: pci: apple,pcie: Add t6000 support

This new SoC is compatible with the existing driver, but the block
supports 4 downstream ports, so we need to adjust the binding to
allow that.

Signed-off-by: Hector Martin <[email protected]>
---
.../devicetree/bindings/pci/apple,pcie.yaml | 28 ++++++++++++++-----
1 file changed, 21 insertions(+), 7 deletions(-)

diff --git a/Documentation/devicetree/bindings/pci/apple,pcie.yaml b/Documentation/devicetree/bindings/pci/apple,pcie.yaml
index ef1d424ec299..7f01e15fc81c 100644
--- a/Documentation/devicetree/bindings/pci/apple,pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/apple,pcie.yaml
@@ -28,19 +28,17 @@ description: |
distributed over the root ports as the OS sees fit by programming
the PCIe controller's port registers.

-allOf:
- - $ref: /schemas/pci/pci-bus.yaml#
- - $ref: /schemas/interrupt-controller/msi-controller.yaml#
-
properties:
compatible:
items:
- - const: apple,t8103-pcie
+ - enum:
+ - apple,t8103-pcie
+ - apple,t6000-pcie
- const: apple,pcie

reg:
minItems: 3
- maxItems: 5
+ maxItems: 6

reg-names:
minItems: 3
@@ -50,6 +48,7 @@ properties:
- const: port0
- const: port1
- const: port2
+ - const: port3

ranges:
minItems: 2
@@ -59,7 +58,7 @@ properties:
description:
Interrupt specifiers, one for each root port.
minItems: 1
- maxItems: 3
+ maxItems: 4

msi-parent: true

@@ -81,6 +80,21 @@ required:

unevaluatedProperties: false

+allOf:
+ - $ref: /schemas/pci/pci-bus.yaml#
+ - $ref: /schemas/interrupt-controller/msi-controller.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: apple,t8103-pcie
+ then:
+ properties:
+ reg:
+ maxItems: 5
+ interrupts:
+ maxItems: 3
+
examples:
- |
#include <dt-bindings/interrupt-controller/apple-aic.h>
--
2.33.0


2021-12-09 05:10:29

by Hector Martin

[permalink] [raw]
Subject: [PATCH 4/4] dt-bindings: pinctrl: apple,pinctrl: Add apple,t6000-pinctrl compatible

This new SoC uses the same pinctrl hardware, so just add a new per-SoC
compatible.

Signed-off-by: Hector Martin <[email protected]>
---
Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml
index 6ca59974664e..d3b11351ca45 100644
--- a/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml
@@ -17,7 +17,9 @@ description: |
properties:
compatible:
items:
- - const: apple,t8103-pinctrl
+ - enum:
+ - apple,t8103-pinctrl
+ - apple,t6000-pinctrl
- const: apple,pinctrl

reg:
--
2.33.0


2021-12-09 14:19:33

by Mark Kettenis

[permalink] [raw]
Subject: Re: [PATCH 1/4] dt-bindings: arm: apple: Add t6000/t6001 MacBook Pro 14/16" compatibles

> From: Hector Martin <[email protected]>
> Date: Thu, 9 Dec 2021 14:09:58 +0900
>
> This adds the initial apple,t6000 platforms:
>
> - apple,j314s - MacBook Pro (14-inch, M1 Pro, 2021)
> - apple,j316s - MacBook Pro (16-inch, M1 Pro, 2021)
>
> And the initial apple,t6001 platforms:
>
> - apple,j314c - MacBook Pro (14-inch, M1 Max, 2021)
> - apple,j316c - MacBook Pro (16-inch, M1 Max, 2021)
>
> Signed-off-by: Hector Martin <[email protected]>
> ---
> .../devicetree/bindings/arm/apple.yaml | 21 +++++++++++++++++++
> 1 file changed, 21 insertions(+)

Reviewed-by: Mark Kettenis <[email protected]>

> diff --git a/Documentation/devicetree/bindings/arm/apple.yaml b/Documentation/devicetree/bindings/arm/apple.yaml
> index b23c8dc5a27d..8d93e8a6cc18 100644
> --- a/Documentation/devicetree/bindings/arm/apple.yaml
> +++ b/Documentation/devicetree/bindings/arm/apple.yaml
> @@ -19,6 +19,13 @@ description: |
> - MacBook Air (M1, 2020)
> - iMac (24-inch, M1, 2021)
>
> + And devices based on the "M1 Pro" and "M1 Max" SoCs:
> +
> + - MacBook Pro (14-inch, M1 Pro, 2021)
> + - MacBook Pro (14-inch, M1 Max, 2021)
> + - MacBook Pro (16-inch, M1 Pro, 2021)
> + - MacBook Pro (16-inch, M1 Max, 2021)
> +
> The compatible property should follow this format:
>
> compatible = "apple,<targettype>", "apple,<socid>", "apple,arm-platform";
> @@ -60,6 +67,20 @@ properties:
> - apple,j457 # iMac (24-inch, 2x USB-C, M1, 2021)
> - const: apple,t8103
> - const: apple,arm-platform
> + - description: Apple M1 Pro SoC based platforms
> + items:
> + - enum:
> + - apple,j314s # MacBook Pro (14-inch, M1 Pro, 2021)
> + - apple,j316s # MacBook Pro (16-inch, M1 Pro, 2021)
> + - const: apple,t6000
> + - const: apple,arm-platform
> + - description: Apple M1 Max SoC based platforms
> + items:
> + - enum:
> + - apple,j314c # MacBook Pro (14-inch, M1 Max, 2021)
> + - apple,j316c # MacBook Pro (16-inch, M1 Max, 2021)
> + - const: apple,t6001
> + - const: apple,arm-platform
>
> additionalProperties: true
>
> --
> 2.33.0

2021-12-09 14:20:26

by Mark Kettenis

[permalink] [raw]
Subject: Re: [PATCH 2/4] dt-bindings: i2c: apple, i2c: Add apple, t6000-i2c compatible

> From: Hector Martin <[email protected]>
> Date: Thu, 9 Dec 2021 14:09:59 +0900
>
> This block is compatible with t8103, so just add the new per-SoC
> compatible under apple,i2c.
>
> Signed-off-by: Hector Martin <[email protected]>
> ---
> Documentation/devicetree/bindings/i2c/apple,i2c.yaml | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>

Reviewed-by: Mark Kettenis <[email protected]>

> diff --git a/Documentation/devicetree/bindings/i2c/apple,i2c.yaml b/Documentation/devicetree/bindings/i2c/apple,i2c.yaml
> index 47dd6c107a6d..4ac61fec90e2 100644
> --- a/Documentation/devicetree/bindings/i2c/apple,i2c.yaml
> +++ b/Documentation/devicetree/bindings/i2c/apple,i2c.yaml
> @@ -21,7 +21,9 @@ allOf:
> properties:
> compatible:
> items:
> - - const: apple,t8103-i2c
> + - enum:
> + - apple,t8103-i2c
> + - apple,t6000-i2c
> - const: apple,i2c
>
> reg:
> --
> 2.33.0

2021-12-09 14:25:20

by Mark Kettenis

[permalink] [raw]
Subject: Re: [PATCH 3/4] dt-bindings: pci: apple,pcie: Add t6000 support

> From: Hector Martin <[email protected]>
> Date: Thu, 9 Dec 2021 14:10:00 +0900
>
> This new SoC is compatible with the existing driver, but the block
> supports 4 downstream ports, so we need to adjust the binding to
> allow that.
>
> Signed-off-by: Hector Martin <[email protected]>
> ---
> .../devicetree/bindings/pci/apple,pcie.yaml | 28 ++++++++++++++-----
> 1 file changed, 21 insertions(+), 7 deletions(-)

Not 100% certain if we really want to constrain things on a per-SoC
basis this way. But it matches my understanding of the hardware.

Reviewed-by: Mark Kettenis <[email protected]>

> diff --git a/Documentation/devicetree/bindings/pci/apple,pcie.yaml b/Documentation/devicetree/bindings/pci/apple,pcie.yaml
> index ef1d424ec299..7f01e15fc81c 100644
> --- a/Documentation/devicetree/bindings/pci/apple,pcie.yaml
> +++ b/Documentation/devicetree/bindings/pci/apple,pcie.yaml
> @@ -28,19 +28,17 @@ description: |
> distributed over the root ports as the OS sees fit by programming
> the PCIe controller's port registers.
>
> -allOf:
> - - $ref: /schemas/pci/pci-bus.yaml#
> - - $ref: /schemas/interrupt-controller/msi-controller.yaml#
> -
> properties:
> compatible:
> items:
> - - const: apple,t8103-pcie
> + - enum:
> + - apple,t8103-pcie
> + - apple,t6000-pcie
> - const: apple,pcie
>
> reg:
> minItems: 3
> - maxItems: 5
> + maxItems: 6
>
> reg-names:
> minItems: 3
> @@ -50,6 +48,7 @@ properties:
> - const: port0
> - const: port1
> - const: port2
> + - const: port3
>
> ranges:
> minItems: 2
> @@ -59,7 +58,7 @@ properties:
> description:
> Interrupt specifiers, one for each root port.
> minItems: 1
> - maxItems: 3
> + maxItems: 4
>
> msi-parent: true
>
> @@ -81,6 +80,21 @@ required:
>
> unevaluatedProperties: false
>
> +allOf:
> + - $ref: /schemas/pci/pci-bus.yaml#
> + - $ref: /schemas/interrupt-controller/msi-controller.yaml#
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: apple,t8103-pcie
> + then:
> + properties:
> + reg:
> + maxItems: 5
> + interrupts:
> + maxItems: 3
> +
> examples:
> - |
> #include <dt-bindings/interrupt-controller/apple-aic.h>
> --
> 2.33.0

2021-12-09 14:25:48

by Mark Kettenis

[permalink] [raw]
Subject: Re: [PATCH 4/4] dt-bindings: pinctrl: apple, pinctrl: Add apple, t6000-pinctrl compatible

> From: Hector Martin <[email protected]>
> Date: Thu, 9 Dec 2021 14:10:01 +0900
>
> This new SoC uses the same pinctrl hardware, so just add a new per-SoC
> compatible.
>
> Signed-off-by: Hector Martin <[email protected]>
> ---
> Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>

Reviewed-by: Mark Kettenis <[email protected]>

> diff --git a/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml
> index 6ca59974664e..d3b11351ca45 100644
> --- a/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml
> @@ -17,7 +17,9 @@ description: |
> properties:
> compatible:
> items:
> - - const: apple,t8103-pinctrl
> + - enum:
> + - apple,t8103-pinctrl
> + - apple,t6000-pinctrl
> - const: apple,pinctrl
>
> reg:
> --
> 2.33.0
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>

2021-12-09 16:35:07

by Sven Peter

[permalink] [raw]
Subject: Re: [PATCH 2/4] dt-bindings: i2c: apple,i2c: Add apple,t6000-i2c compatible



On Thu, Dec 9, 2021, at 06:09, Hector Martin wrote:
> This block is compatible with t8103, so just add the new per-SoC
> compatible under apple,i2c.
>
> Signed-off-by: Hector Martin <[email protected]>
> ---
> Documentation/devicetree/bindings/i2c/apple,i2c.yaml | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)

Reviewed-by: Sven Peter <[email protected]>

2021-12-09 17:12:57

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 1/4] dt-bindings: arm: apple: Add t6000/t6001 MacBook Pro 14/16" compatibles

On Thu, 09 Dec 2021 14:09:58 +0900, Hector Martin wrote:
> This adds the initial apple,t6000 platforms:
>
> - apple,j314s - MacBook Pro (14-inch, M1 Pro, 2021)
> - apple,j316s - MacBook Pro (16-inch, M1 Pro, 2021)
>
> And the initial apple,t6001 platforms:
>
> - apple,j314c - MacBook Pro (14-inch, M1 Max, 2021)
> - apple,j316c - MacBook Pro (16-inch, M1 Max, 2021)
>
> Signed-off-by: Hector Martin <[email protected]>
> ---
> .../devicetree/bindings/arm/apple.yaml | 21 +++++++++++++++++++
> 1 file changed, 21 insertions(+)
>

Acked-by: Rob Herring <[email protected]>

2021-12-09 17:13:17

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 2/4] dt-bindings: i2c: apple,i2c: Add apple,t6000-i2c compatible

On Thu, 09 Dec 2021 14:09:59 +0900, Hector Martin wrote:
> This block is compatible with t8103, so just add the new per-SoC
> compatible under apple,i2c.
>
> Signed-off-by: Hector Martin <[email protected]>
> ---
> Documentation/devicetree/bindings/i2c/apple,i2c.yaml | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>

Acked-by: Rob Herring <[email protected]>

2021-12-09 17:15:41

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 3/4] dt-bindings: pci: apple,pcie: Add t6000 support

On Thu, 09 Dec 2021 14:10:00 +0900, Hector Martin wrote:
> This new SoC is compatible with the existing driver, but the block
> supports 4 downstream ports, so we need to adjust the binding to
> allow that.
>
> Signed-off-by: Hector Martin <[email protected]>
> ---
> .../devicetree/bindings/pci/apple,pcie.yaml | 28 ++++++++++++++-----
> 1 file changed, 21 insertions(+), 7 deletions(-)
>

Acked-by: Rob Herring <[email protected]>

2021-12-09 17:16:05

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 4/4] dt-bindings: pinctrl: apple,pinctrl: Add apple,t6000-pinctrl compatible

On Thu, 09 Dec 2021 14:10:01 +0900, Hector Martin wrote:
> This new SoC uses the same pinctrl hardware, so just add a new per-SoC
> compatible.
>
> Signed-off-by: Hector Martin <[email protected]>
> ---
> Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>

Acked-by: Rob Herring <[email protected]>

2021-12-12 04:04:59

by Hector Martin

[permalink] [raw]
Subject: Re: [PATCH 0/4] dt-bindings: Add trivial Apple t6000/t6001 SoC bindings

On 09/12/2021 14.09, Hector Martin wrote:
> Hi Rob et al,
>
> This series adds trivial DT binding changes (compatibles and some misc
> changes) to support Apple's t6000/t6001 SoCs and the devices that use
> them. These changes are for devices that need no driver changes to
> support these new SoCs. Drivers that need changes (notably AICv2) have
> the binding change submitted as part of that series.
>
> The only nontrivial patch is #3 for the PCIe binding, which grew a port.
> I tried to set it up so it'll fail validation if you try to have too
> many ports on t8103.
>
> I'll be happy to merge this through the Asahi-SoC tree once reviewed :)
>
> Hector Martin (4):
> dt-bindings: arm: apple: Add t6000/t6001 MacBook Pro 14/16"
> compatibles
> dt-bindings: i2c: apple,i2c: Add apple,t6000-i2c compatible
> dt-bindings: pci: apple,pcie: Add t6000 support
> dt-bindings: pinctrl: apple,pinctrl: Add apple,t6000-pinctrl
> compatible
>
> .../devicetree/bindings/arm/apple.yaml | 21 ++++++++++++++
> .../devicetree/bindings/i2c/apple,i2c.yaml | 4 ++-
> .../devicetree/bindings/pci/apple,pcie.yaml | 28 ++++++++++++++-----
> .../bindings/pinctrl/apple,pinctrl.yaml | 4 ++-
> 4 files changed, 48 insertions(+), 9 deletions(-)
>

Thanks for the reviews! This is now queued in asahi-soc/dt.

--
Hector Martin ([email protected])
Public Key: https://mrcn.st/pub