Message ID | 20211122225807.8105-5-j@jannau.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Add DTs for all Apple M1 (t8103) devices | expand |
On Mon, Nov 22, 2021, at 23:58, Janne Grunau wrote: > All M1 Mac devices have 2 SoC connected USB-C ports and use cd321x USB > type C port switch and power deliver controllers. I2c bus and adresses > configuration are for all devices equal. > The iMac (24-inch, 2021) has a configuration with 2 additional USB-C > ports (j456) using two addiotional cd321x controllers. > > Signed-off-by: Janne Grunau <j@jannau.net> > --- > arch/arm64/boot/dts/apple/t8103-j456.dts | 18 ++++++++++++++++++ > arch/arm64/boot/dts/apple/t8103-jxxx.dtsi | 18 ++++++++++++++++++ > 2 files changed, 36 insertions(+) > > diff --git a/arch/arm64/boot/dts/apple/t8103-j456.dts > b/arch/arm64/boot/dts/apple/t8103-j456.dts > index 7267e069355b..c6b8c28455f5 100644 > --- a/arch/arm64/boot/dts/apple/t8103-j456.dts > +++ b/arch/arm64/boot/dts/apple/t8103-j456.dts > @@ -21,6 +21,24 @@ aliases { > }; > }; > > +&i2c0 { > + hpm2: tps6598x@3b { I know that the tps example in the binding uses tps6598x as the node name but I think that these names are usually more general. Maybe usb-pd@3b instead which is used in arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi and reflects the function of this device. With that fixed: Reviewed-by: Sven Peter <sven@svenpeter.dev> Thanks, Sven
On 23/11/2021 07.58, Janne Grunau wrote: > All M1 Mac devices have 2 SoC connected USB-C ports and use cd321x USB > type C port switch and power deliver controllers. I2c bus and adresses > configuration are for all devices equal. > The iMac (24-inch, 2021) has a configuration with 2 additional USB-C > ports (j456) using two addiotional cd321x controllers. > > Signed-off-by: Janne Grunau <j@jannau.net> > --- > arch/arm64/boot/dts/apple/t8103-j456.dts | 18 ++++++++++++++++++ > arch/arm64/boot/dts/apple/t8103-jxxx.dtsi | 18 ++++++++++++++++++ > 2 files changed, 36 insertions(+) > > diff --git a/arch/arm64/boot/dts/apple/t8103-j456.dts b/arch/arm64/boot/dts/apple/t8103-j456.dts > index 7267e069355b..c6b8c28455f5 100644 > --- a/arch/arm64/boot/dts/apple/t8103-j456.dts > +++ b/arch/arm64/boot/dts/apple/t8103-j456.dts > @@ -21,6 +21,24 @@ aliases { > }; > }; > > +&i2c0 { > + hpm2: tps6598x@3b { > + compatible = "apple,cd321x"; > + reg = <0x3b>; > + interrupt-parent = <&pinctrl_ap>; > + interrupts = <106 IRQ_TYPE_LEVEL_LOW>; > + interrupt-names = "irq"; > + }; > + > + hpm3: tps6598x@3c { > + compatible = "apple,cd321x"; > + reg = <0x3c>; > + interrupt-parent = <&pinctrl_ap>; > + interrupts = <106 IRQ_TYPE_LEVEL_LOW>; > + interrupt-names = "irq"; > + }; > +}; > + > /* > * Force the bus number assignments so that we can declare some of the > * on-board devices and properties that are populated by the bootloader > diff --git a/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi b/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi > index 53d22b434d76..5f748f3f60d2 100644 > --- a/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi > +++ b/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi > @@ -39,6 +39,24 @@ &serial0 { > status = "okay"; > }; > > +&i2c0 { > + hpm0: tps6598x@38 { > + compatible = "apple,cd321x"; > + reg = <0x38>; > + interrupt-parent = <&pinctrl_ap>; > + interrupts = <106 IRQ_TYPE_LEVEL_LOW>; > + interrupt-names = "irq"; > + }; > + > + hpm1: tps6598x@3f { > + compatible = "apple,cd321x"; > + reg = <0x3f>; > + interrupt-parent = <&pinctrl_ap>; > + interrupts = <106 IRQ_TYPE_LEVEL_LOW>; > + interrupt-names = "irq"; > + }; > +}; > + > /* > * Force the bus number assignments so that we can declare some of the > * on-board devices and properties that are populated by the bootloader > With sven's comments addressed, Acked-by: Hector Martin <marcan@marcan.st>
diff --git a/arch/arm64/boot/dts/apple/t8103-j456.dts b/arch/arm64/boot/dts/apple/t8103-j456.dts index 7267e069355b..c6b8c28455f5 100644 --- a/arch/arm64/boot/dts/apple/t8103-j456.dts +++ b/arch/arm64/boot/dts/apple/t8103-j456.dts @@ -21,6 +21,24 @@ aliases { }; }; +&i2c0 { + hpm2: tps6598x@3b { + compatible = "apple,cd321x"; + reg = <0x3b>; + interrupt-parent = <&pinctrl_ap>; + interrupts = <106 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "irq"; + }; + + hpm3: tps6598x@3c { + compatible = "apple,cd321x"; + reg = <0x3c>; + interrupt-parent = <&pinctrl_ap>; + interrupts = <106 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "irq"; + }; +}; + /* * Force the bus number assignments so that we can declare some of the * on-board devices and properties that are populated by the bootloader diff --git a/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi b/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi index 53d22b434d76..5f748f3f60d2 100644 --- a/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi +++ b/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi @@ -39,6 +39,24 @@ &serial0 { status = "okay"; }; +&i2c0 { + hpm0: tps6598x@38 { + compatible = "apple,cd321x"; + reg = <0x38>; + interrupt-parent = <&pinctrl_ap>; + interrupts = <106 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "irq"; + }; + + hpm1: tps6598x@3f { + compatible = "apple,cd321x"; + reg = <0x3f>; + interrupt-parent = <&pinctrl_ap>; + interrupts = <106 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "irq"; + }; +}; + /* * Force the bus number assignments so that we can declare some of the * on-board devices and properties that are populated by the bootloader
All M1 Mac devices have 2 SoC connected USB-C ports and use cd321x USB type C port switch and power deliver controllers. I2c bus and adresses configuration are for all devices equal. The iMac (24-inch, 2021) has a configuration with 2 additional USB-C ports (j456) using two addiotional cd321x controllers. Signed-off-by: Janne Grunau <j@jannau.net> --- arch/arm64/boot/dts/apple/t8103-j456.dts | 18 ++++++++++++++++++ arch/arm64/boot/dts/apple/t8103-jxxx.dtsi | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+)