2021-11-22 22:24:46

by Janne Grunau

[permalink] [raw]
Subject: [PATCH v2 0/3] 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(-)

--
2.34.0



2021-11-22 22:24:48

by Janne Grunau

[permalink] [raw]
Subject: [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")
Reviewed-by: Mark Kettenis <[email protected]>
Signed-off-by: Janne Grunau <[email protected]>
---
arch/arm64/boot/dts/apple/t8103-j274.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/apple/t8103-j274.dts b/arch/arm64/boot/dts/apple/t8103-j274.dts
index 33a80f9501dc..02c36301e985 100644
--- a/arch/arm64/boot/dts/apple/t8103-j274.dts
+++ b/arch/arm64/boot/dts/apple/t8103-j274.dts
@@ -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];
--
2.34.0


2021-11-22 22:24:51

by Janne Grunau

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

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

Fixes: 0a8282b83119 ("arm64: apple: Add pinctrl nodes")
Signed-off-by: Janne Grunau <[email protected]>
Cc: Mark Kettenis <[email protected]>
Reviewed-by: Sven Peter <[email protected]>
---
arch/arm64/boot/dts/apple/t8103.dtsi | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/apple/t8103.dtsi b/arch/arm64/boot/dts/apple/t8103.dtsi
index fc8b2bb06ffe..c320c8baeb41 100644
--- a/arch/arm64/boot/dts/apple/t8103.dtsi
+++ b/arch/arm64/boot/dts/apple/t8103.dtsi
@@ -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>,
--
2.34.0


2021-11-22 22:24:53

by Janne Grunau

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

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")
Signed-off-by: Janne Grunau <[email protected]>
Cc: Mark Kettenis <[email protected]>
Reviewed-by: Sven Peter <[email protected]>
---
Documentation/devicetree/bindings/i2c/apple,i2c.yaml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/i2c/apple,i2c.yaml b/Documentation/devicetree/bindings/i2c/apple,i2c.yaml
index 22fc8483256f..82b953181a52 100644
--- a/Documentation/devicetree/bindings/i2c/apple,i2c.yaml
+++ b/Documentation/devicetree/bindings/i2c/apple,i2c.yaml
@@ -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>;
--
2.34.0


2021-11-22 22:38:03

by Mark Kettenis

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

> 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")
> Signed-off-by: Janne Grunau <[email protected]>
> Cc: Mark Kettenis <[email protected]>
> Reviewed-by: Sven Peter <[email protected]>

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

> ---
> arch/arm64/boot/dts/apple/t8103.dtsi | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/apple/t8103.dtsi b/arch/arm64/boot/dts/apple/t8103.dtsi
> index fc8b2bb06ffe..c320c8baeb41 100644
> --- a/arch/arm64/boot/dts/apple/t8103.dtsi
> +++ b/arch/arm64/boot/dts/apple/t8103.dtsi
> @@ -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>,
> --
> 2.34.0
>
>

2021-11-22 22:39:17

by Mark Kettenis

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

> 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")
> Signed-off-by: Janne Grunau <[email protected]>
> Cc: Mark Kettenis <[email protected]>
> Reviewed-by: Sven Peter <[email protected]>

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

> ---
> Documentation/devicetree/bindings/i2c/apple,i2c.yaml | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/i2c/apple,i2c.yaml b/Documentation/devicetree/bindings/i2c/apple,i2c.yaml
> index 22fc8483256f..82b953181a52 100644
> --- a/Documentation/devicetree/bindings/i2c/apple,i2c.yaml
> +++ b/Documentation/devicetree/bindings/i2c/apple,i2c.yaml
> @@ -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>;
> --
> 2.34.0
>
>

2021-11-23 04:28:00

by Hector Martin

[permalink] [raw]
Subject: Re: [PATCH v2 0/3] Apple Arm patform device tree and bindings fixes

On 23/11/2021 07.24, Janne Grunau wrote:
> 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(-)
>

Acked-by: Hector Martin <[email protected]>

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

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

2021-11-23 09:48:21

by Wolfram Sang

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

On Mon, Nov 22, 2021 at 11:24:39PM +0100, Janne Grunau wrote:
> 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")
> Signed-off-by: Janne Grunau <[email protected]>
> Cc: Mark Kettenis <[email protected]>
> Reviewed-by: Sven Peter <[email protected]>

Acked-by: Wolfram Sang <[email protected]>


Attachments:
(No filename) (448.00 B)
signature.asc (833.00 B)
Download all attachments

2021-11-30 21:07:42

by Rob Herring (Arm)

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

On Mon, 22 Nov 2021 23:24:39 +0100, Janne Grunau wrote:
> 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")
> Signed-off-by: Janne Grunau <[email protected]>
> Cc: Mark Kettenis <[email protected]>
> Reviewed-by: Sven Peter <[email protected]>
> ---
> Documentation/devicetree/bindings/i2c/apple,i2c.yaml | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>

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