Skip to contentSkip to conversation

Apple Arm patform device tree and bindings fixes

PATCH In review Janne Grunau 5 participants 9 messages Nov 22, 2021 – Nov 30, 2021

Subsystems (3)
lore
Share & tools
lore

Janne Grunau

author maintainer
#0 lore raw

v2 cover Apple Arm patform device tree and bindings fixes

Hej All,

this series fixes small issues in the device tree bindings and files for the Apple Arm platform in v5.16-rc1. The fixes are non-critical but make things easier moving forward.

Changes since v1:
- replaced single value enum in apple,i2c.yaml with const
- added Sven Peter's Reviewed-by tags to Patch 2 and 3

thanks
Janne

The series is available as branch at
https://github.com/jannau/linux/tree/apple_m1/dt-fixes-for-5.16_v2

Janne Grunau (3):
arm64: dts: apple: change ethernet0 device type to ethernet
dt-bindings: i2c: apple,i2c: allow multiple compatibles
arm64: dts: apple: add #interrupt-cells property to pinctrl nodes

 Documentation/devicetree/bindings/i2c/apple,i2c.yaml | 8 ++++----
 arch/arm64/boot/dts/apple/t8103-j274.dts             | 2 +-
 arch/arm64/boot/dts/apple/t8103.dtsi                 | 4 ++++
 3 files changed, 9 insertions(+), 5 deletions(-)
Signature · 1 line
2.34.0
author maintainer
#1 lore raw

PATCH v2 1/3 arm64: dts: apple: change ethernet0 device type to ethernet

Fixes make dtbs_check errors for t8103-j274.dts due to missing pci properties.

Fixes e1bebf978151 ("arm64: dts: apple: j274: Expose PCI node for the Ethernet MAC address")
---
 arch/arm64/boot/dts/apple/t8103-j274.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/apple/t8103-j274.dts +1 -1
index 33a80f9501dc..02c36301e985 100644
@@ -60,7 +60,7 @@ &port01 {
 
 &port02 {
 	bus-range = <3 3>;
-	ethernet0: pci@0,0 {
+	ethernet0: ethernet@0,0 {
 		reg = <0x30000 0x0 0x0 0x0 0x0>;
 		/* To be filled by the loader */
 		local-mac-address = [00 10 18 00 00 00];
Signature · 1 line
2.34.0
author maintainer
#2 lore raw

PATCH v2 2/3 dt-bindings: i2c: apple,i2c: allow multiple compatibles

In reply to Janne Grunau

The intention was to have a SoC-specific and base compatible string to allow forward compatibility and SoC specific quirks,

Fixes df7c4a8c1b47 ("dt-bindings: i2c: Add Apple I2C controller bindings")
Cc Mark Kettenis <[email protected]>
---
 Documentation/devicetree/bindings/i2c/apple,i2c.yaml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/i2c/apple,i2c.yaml +4 -4
index 22fc8483256f..82b953181a52 100644
@@ -20,9 +20,9 @@ allOf:
 
 properties:
   compatible:
-    enum:
-      - apple,t8103-i2c
-      - apple,i2c
+    items:
+      - const: apple,t8103-i2c
+      - const: apple,i2c
 
   reg:
     maxItems: 1
@@ -51,7 +51,7 @@ unevaluatedProperties: false
 examples:
   - |
     i2c@35010000 {
-      compatible = "apple,t8103-i2c";
+      compatible = "apple,t8103-i2c", "apple,i2c";
       reg = <0x35010000 0x4000>;
       interrupt-parent = <&aic>;
       interrupts = <0 627 4>;
Signature · 1 line
2.34.0
Reviewed-by on v2 2/3
#3 lore raw

Re: [PATCH v2 2/3] dt-bindings: i2c: apple,i2c: allow multiple compatibles

Quoted 10 lines

From: Janne Grunau <[email protected]>
Date: Mon, 22 Nov 2021 23:24:39 +0100

The intention was to have a SoC-specific and base compatible string to allow forward compatibility and SoC specific quirks,

Fixes df7c4a8c1b47 ("dt-bindings: i2c: Add Apple I2C controller bindings")
Cc Mark Kettenis <[email protected]>
Quoted 34 lines
---
 Documentation/devicetree/bindings/i2c/apple,i2c.yaml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/i2c/apple,i2c.yaml +4 -4
index 22fc8483256f..82b953181a52 100644
@@ -20,9 +20,9 @@ allOf:
 
 properties:
   compatible:
-    enum:
-      - apple,t8103-i2c
-      - apple,i2c
+    items:
+      - const: apple,t8103-i2c
+      - const: apple,i2c
 
   reg:
     maxItems: 1
@@ -51,7 +51,7 @@ unevaluatedProperties: false
 examples:
   - |
     i2c@35010000 {
-      compatible = "apple,t8103-i2c";
+      compatible = "apple,t8103-i2c", "apple,i2c";
       reg = <0x35010000 0x4000>;
       interrupt-parent = <&aic>;
       interrupts = <0 627 4>;
Signature · 1 line
2.34.0
Acked-by on v2 2/3
#4 lore raw

Re: [PATCH v2 2/3] dt-bindings: i2c: apple,i2c: allow multiple compatibles

In reply to Janne Grunau
Quoted 7 lines · Janne Grunau

The intention was to have a SoC-specific and base compatible string to allow forward compatibility and SoC specific quirks,

Fixes df7c4a8c1b47 ("dt-bindings: i2c: Add Apple I2C controller bindings")
Cc Mark Kettenis <[email protected]>
maintainer Acked-by on v2 2/3
#5 lore raw

Re: [PATCH v2 2/3] dt-bindings: i2c: apple,i2c: allow multiple compatibles

In reply to Janne Grunau
Quoted 11 lines · Janne Grunau

The intention was to have a SoC-specific and base compatible string to allow forward compatibility and SoC specific quirks,

Fixes df7c4a8c1b47 ("dt-bindings: i2c: Add Apple I2C controller bindings")
Cc Mark Kettenis <[email protected]>
---
 Documentation/devicetree/bindings/i2c/apple,i2c.yaml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
author maintainer
#6 lore raw

PATCH v2 3/3 arm64: dts: apple: add #interrupt-cells property to pinctrl nodes

In reply to Janne Grunau

Required for devices trying to use pinctrl devices as interrupt controller.

Fixes 0a8282b83119 ("arm64: apple: Add pinctrl nodes")
Cc Mark Kettenis <[email protected]>
---
 arch/arm64/boot/dts/apple/t8103.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/apple/t8103.dtsi +4 -0
index fc8b2bb06ffe..c320c8baeb41 100644
@@ -143,6 +143,7 @@ pinctrl_ap: pinctrl@23c100000 {
 			apple,npins = <212>;
 
 			interrupt-controller;
+			#interrupt-cells = <2>;
 			interrupt-parent = <&aic>;
 			interrupts = <AIC_IRQ 190 IRQ_TYPE_LEVEL_HIGH>,
 				     <AIC_IRQ 191 IRQ_TYPE_LEVEL_HIGH>,
@@ -169,6 +170,7 @@ pinctrl_aop: pinctrl@24a820000 {
 			apple,npins = <42>;
 
 			interrupt-controller;
+			#interrupt-cells = <2>;
 			interrupt-parent = <&aic>;
 			interrupts = <AIC_IRQ 268 IRQ_TYPE_LEVEL_HIGH>,
 				     <AIC_IRQ 269 IRQ_TYPE_LEVEL_HIGH>,
@@ -189,6 +191,7 @@ pinctrl_nub: pinctrl@23d1f0000 {
 			apple,npins = <23>;
 
 			interrupt-controller;
+			#interrupt-cells = <2>;
 			interrupt-parent = <&aic>;
 			interrupts = <AIC_IRQ 330 IRQ_TYPE_LEVEL_HIGH>,
 				     <AIC_IRQ 331 IRQ_TYPE_LEVEL_HIGH>,
@@ -209,6 +212,7 @@ pinctrl_smc: pinctrl@23e820000 {
 			apple,npins = <16>;
 
 			interrupt-controller;
+			#interrupt-cells = <2>;
 			interrupt-parent = <&aic>;
 			interrupts = <AIC_IRQ 391 IRQ_TYPE_LEVEL_HIGH>,
 				     <AIC_IRQ 392 IRQ_TYPE_LEVEL_HIGH>,
Signature · 1 line
2.34.0
Reviewed-by on v2 3/3
#7 lore raw

Re: [PATCH v2 3/3] arm64: dts: apple: add #interrupt-cells property to pinctrl nodes

Quoted 10 lines

From: Janne Grunau <[email protected]>
Date: Mon, 22 Nov 2021 23:24:40 +0100

Required for devices trying to use pinctrl devices as interrupt controller.

Fixes 0a8282b83119 ("arm64: apple: Add pinctrl nodes")
Cc Mark Kettenis <[email protected]>
Quoted 44 lines
---
 arch/arm64/boot/dts/apple/t8103.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/apple/t8103.dtsi +4 -0
index fc8b2bb06ffe..c320c8baeb41 100644
@@ -143,6 +143,7 @@ pinctrl_ap: pinctrl@23c100000 {
 			apple,npins = <212>;
 
 			interrupt-controller;
+			#interrupt-cells = <2>;
 			interrupt-parent = <&aic>;
 			interrupts = <AIC_IRQ 190 IRQ_TYPE_LEVEL_HIGH>,
 				     <AIC_IRQ 191 IRQ_TYPE_LEVEL_HIGH>,
@@ -169,6 +170,7 @@ pinctrl_aop: pinctrl@24a820000 {
 			apple,npins = <42>;
 
 			interrupt-controller;
+			#interrupt-cells = <2>;
 			interrupt-parent = <&aic>;
 			interrupts = <AIC_IRQ 268 IRQ_TYPE_LEVEL_HIGH>,
 				     <AIC_IRQ 269 IRQ_TYPE_LEVEL_HIGH>,
@@ -189,6 +191,7 @@ pinctrl_nub: pinctrl@23d1f0000 {
 			apple,npins = <23>;
 
 			interrupt-controller;
+			#interrupt-cells = <2>;
 			interrupt-parent = <&aic>;
 			interrupts = <AIC_IRQ 330 IRQ_TYPE_LEVEL_HIGH>,
 				     <AIC_IRQ 331 IRQ_TYPE_LEVEL_HIGH>,
@@ -209,6 +212,7 @@ pinctrl_smc: pinctrl@23e820000 {
 			apple,npins = <16>;
 
 			interrupt-controller;
+			#interrupt-cells = <2>;
 			interrupt-parent = <&aic>;
 			interrupts = <AIC_IRQ 391 IRQ_TYPE_LEVEL_HIGH>,
 				     <AIC_IRQ 392 IRQ_TYPE_LEVEL_HIGH>,
Signature · 1 line
2.34.0
Acked-by on the v2 series
#8 lore raw
In reply to Janne Grunau
Quoted 21 lines · Janne Grunau

Hej All,

this series fixes small issues in the device tree bindings and files for the Apple Arm platform in v5.16-rc1. The fixes are non-critical but make things easier moving forward.

Changes since v1:
- replaced single value enum in apple,i2c.yaml with const
- added Sven Peter's Reviewed-by tags to Patch 2 and 3

thanks
Janne

The series is available as branch at
https://github.com/jannau/linux/tree/apple_m1/dt-fixes-for-5.16_v2

Janne Grunau (3):
arm64: dts: apple: change ethernet0 device type to ethernet
dt-bindings: i2c: apple,i2c: allow multiple compatibles
arm64: dts: apple: add #interrupt-cells property to pinctrl nodes

Quoted 5 lines
  Documentation/devicetree/bindings/i2c/apple,i2c.yaml | 8 ++++----
  arch/arm64/boot/dts/apple/t8103-j274.dts             | 2 +-
  arch/arm64/boot/dts/apple/t8103.dtsi                 | 4 ++++
  3 files changed, 9 insertions(+), 5 deletions(-)

Thanks! I'll apply this to asahi-soc once Rob acks the binding change.

Signature · 2 lines
Hector Martin ([email protected])
Public Key: https://mrcn.st/pub