Message ID | 20240613134150.318755-1-ivitro@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [v1] arm64: dts: imx8mm-verdin: add TPM device | expand |
On Thu, Jun 13, 2024 at 02:41:50PM +0100, Vitor Soares wrote: > From: Vitor Soares <vitor.soares@toradex.com> > > Add TPM device found on Verdin iMX8M Mini PID4 0090 variant. > > Signed-off-by: Vitor Soares <vitor.soares@toradex.com> > --- > arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi | 16 +++++++++++----- > 1 file changed, 11 insertions(+), 5 deletions(-) > > diff --git a/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi > index 4768b05fd765..c9ae5f0bb526 100644 > --- a/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi > +++ b/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi > @@ -227,15 +227,16 @@ &ecspi2 { > pinctrl-0 = <&pinctrl_ecspi2>; > }; > > -/* Verdin CAN_1 (On-module) */ > +/* On-module SPI */ > &ecspi3 { > #address-cells = <1>; > #size-cells = <0>; > - cs-gpios = <&gpio5 25 GPIO_ACTIVE_LOW>; > + cs-gpios = <&gpio5 25 GPIO_ACTIVE_LOW>, <&gpio4 19 GPIO_ACTIVE_LOW>; > pinctrl-names = "default"; > - pinctrl-0 = <&pinctrl_ecspi3>; > + pinctrl-0 = <&pinctrl_ecspi3>, <&pinctrl_pmic_tpm_ena>; Would it make more sense to have tpm pinctrl in node tpm@1 below? Shawn > status = "okay"; > > + /* Verdin CAN_1 */ > can1: can@0 { > compatible = "microchip,mcp251xfd"; > clocks = <&clk40m>; > @@ -245,6 +246,12 @@ can1: can@0 { > reg = <0>; > spi-max-frequency = <8500000>; > }; > + > + verdin_som_tpm: tpm@1 { > + compatible = "atmel,attpm20p", "tcg,tpm_tis-spi"; > + reg = <0x1>; > + spi-max-frequency = <36000000>; > + }; > }; > > /* Verdin ETH_1 (On-module PHY) */ > @@ -807,8 +814,7 @@ &iomuxc { > pinctrl-0 = <&pinctrl_gpio1>, <&pinctrl_gpio2>, > <&pinctrl_gpio3>, <&pinctrl_gpio4>, > <&pinctrl_gpio7>, <&pinctrl_gpio8>, > - <&pinctrl_gpio_hog1>, <&pinctrl_gpio_hog2>, <&pinctrl_gpio_hog3>, > - <&pinctrl_pmic_tpm_ena>; > + <&pinctrl_gpio_hog1>, <&pinctrl_gpio_hog2>, <&pinctrl_gpio_hog3>; > > pinctrl_can1_int: can1intgrp { > fsl,pins = > -- > 2.34.1 >
Hello Shawn, On Mon, Jun 17, 2024 at 10:33:50AM +0800, Shawn Guo wrote: > On Thu, Jun 13, 2024 at 02:41:50PM +0100, Vitor Soares wrote: > > From: Vitor Soares <vitor.soares@toradex.com> > > > > Add TPM device found on Verdin iMX8M Mini PID4 0090 variant. > > > > Signed-off-by: Vitor Soares <vitor.soares@toradex.com> > > --- > > arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi | 16 +++++++++++----- > > 1 file changed, 11 insertions(+), 5 deletions(-) > > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi > > index 4768b05fd765..c9ae5f0bb526 100644 > > --- a/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi > > +++ b/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi > > @@ -227,15 +227,16 @@ &ecspi2 { > > pinctrl-0 = <&pinctrl_ecspi2>; > > }; > > > > -/* Verdin CAN_1 (On-module) */ > > +/* On-module SPI */ > > &ecspi3 { > > #address-cells = <1>; > > #size-cells = <0>; > > - cs-gpios = <&gpio5 25 GPIO_ACTIVE_LOW>; > > + cs-gpios = <&gpio5 25 GPIO_ACTIVE_LOW>, <&gpio4 19 GPIO_ACTIVE_LOW>; > > pinctrl-names = "default"; > > - pinctrl-0 = <&pinctrl_ecspi3>; > > + pinctrl-0 = <&pinctrl_ecspi3>, <&pinctrl_pmic_tpm_ena>; > > Would it make more sense to have tpm pinctrl in node tpm@1 below? It's the pinctrl of the SPI Chip Select pin, not something about the TPM, I think it's correct to have it into the ecspi node. > > + verdin_som_tpm: tpm@1 { > > + compatible = "atmel,attpm20p", "tcg,tpm_tis-spi"; > > + reg = <0x1>; > > + spi-max-frequency = <36000000>; > > + }; > > }; Francesco
On Mon, Jun 17, 2024 at 09:18:42AM +0200, Francesco Dolcini wrote: > Hello Shawn, > > On Mon, Jun 17, 2024 at 10:33:50AM +0800, Shawn Guo wrote: > > On Thu, Jun 13, 2024 at 02:41:50PM +0100, Vitor Soares wrote: > > > From: Vitor Soares <vitor.soares@toradex.com> > > > > > > Add TPM device found on Verdin iMX8M Mini PID4 0090 variant. > > > > > > Signed-off-by: Vitor Soares <vitor.soares@toradex.com> > > > --- > > > arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi | 16 +++++++++++----- > > > 1 file changed, 11 insertions(+), 5 deletions(-) > > > > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi > > > index 4768b05fd765..c9ae5f0bb526 100644 > > > --- a/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi > > > +++ b/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi > > > @@ -227,15 +227,16 @@ &ecspi2 { > > > pinctrl-0 = <&pinctrl_ecspi2>; > > > }; > > > > > > -/* Verdin CAN_1 (On-module) */ > > > +/* On-module SPI */ > > > &ecspi3 { > > > #address-cells = <1>; > > > #size-cells = <0>; > > > - cs-gpios = <&gpio5 25 GPIO_ACTIVE_LOW>; > > > + cs-gpios = <&gpio5 25 GPIO_ACTIVE_LOW>, <&gpio4 19 GPIO_ACTIVE_LOW>; > > > pinctrl-names = "default"; > > > - pinctrl-0 = <&pinctrl_ecspi3>; > > > + pinctrl-0 = <&pinctrl_ecspi3>, <&pinctrl_pmic_tpm_ena>; > > > > Would it make more sense to have tpm pinctrl in node tpm@1 below? > It's the pinctrl of the SPI Chip Select pin, not something about the > TPM, I think it's correct to have it into the ecspi node. The name pinctrl_pmic_tpm_ena seems confusing then. Shawn
On Thu, Jun 27, 2024 at 02:57:48PM +0800, Shawn Guo wrote: > On Mon, Jun 17, 2024 at 09:18:42AM +0200, Francesco Dolcini wrote: > > Hello Shawn, > > > > On Mon, Jun 17, 2024 at 10:33:50AM +0800, Shawn Guo wrote: > > > On Thu, Jun 13, 2024 at 02:41:50PM +0100, Vitor Soares wrote: > > > > From: Vitor Soares <vitor.soares@toradex.com> > > > > > > > > Add TPM device found on Verdin iMX8M Mini PID4 0090 variant. > > > > > > > > Signed-off-by: Vitor Soares <vitor.soares@toradex.com> > > > > --- > > > > arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi | 16 +++++++++++----- > > > > 1 file changed, 11 insertions(+), 5 deletions(-) > > > > > > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi > > > > index 4768b05fd765..c9ae5f0bb526 100644 > > > > --- a/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi > > > > +++ b/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi > > > > @@ -227,15 +227,16 @@ &ecspi2 { > > > > pinctrl-0 = <&pinctrl_ecspi2>; > > > > }; > > > > > > > > -/* Verdin CAN_1 (On-module) */ > > > > +/* On-module SPI */ > > > > &ecspi3 { > > > > #address-cells = <1>; > > > > #size-cells = <0>; > > > > - cs-gpios = <&gpio5 25 GPIO_ACTIVE_LOW>; > > > > + cs-gpios = <&gpio5 25 GPIO_ACTIVE_LOW>, <&gpio4 19 GPIO_ACTIVE_LOW>; > > > > pinctrl-names = "default"; > > > > - pinctrl-0 = <&pinctrl_ecspi3>; > > > > + pinctrl-0 = <&pinctrl_ecspi3>, <&pinctrl_pmic_tpm_ena>; > > > > > > Would it make more sense to have tpm pinctrl in node tpm@1 below? > > It's the pinctrl of the SPI Chip Select pin, not something about the > > TPM, I think it's correct to have it into the ecspi node. > > The name pinctrl_pmic_tpm_ena seems confusing then. I agree (this is coming from the schematics net name, let's blame the HW folks). With that said, let's rename this to `pinctrl_tpm_spi_cs`. Vitor? Francesco
On Thu, 2024-06-27 at 09:10 +0200, Francesco Dolcini wrote: > On Thu, Jun 27, 2024 at 02:57:48PM +0800, Shawn Guo wrote: > > On Mon, Jun 17, 2024 at 09:18:42AM +0200, Francesco Dolcini wrote: > > > Hello Shawn, > > > > > > On Mon, Jun 17, 2024 at 10:33:50AM +0800, Shawn Guo wrote: > > > > On Thu, Jun 13, 2024 at 02:41:50PM +0100, Vitor Soares wrote: > > > > > From: Vitor Soares <vitor.soares@toradex.com> > > > > > > > > > > Add TPM device found on Verdin iMX8M Mini PID4 0090 variant. > > > > > > > > > > Signed-off-by: Vitor Soares <vitor.soares@toradex.com> > > > > > --- > > > > > arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi | 16 +++++++++++---- > > > > > - > > > > > 1 file changed, 11 insertions(+), 5 deletions(-) > > > > > > > > > > diff --git a/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi > > > > > b/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi > > > > > index 4768b05fd765..c9ae5f0bb526 100644 > > > > > --- a/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi > > > > > +++ b/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi > > > > > @@ -227,15 +227,16 @@ &ecspi2 { > > > > > pinctrl-0 = <&pinctrl_ecspi2>; > > > > > }; > > > > > > > > > > -/* Verdin CAN_1 (On-module) */ > > > > > +/* On-module SPI */ > > > > > &ecspi3 { > > > > > #address-cells = <1>; > > > > > #size-cells = <0>; > > > > > - cs-gpios = <&gpio5 25 GPIO_ACTIVE_LOW>; > > > > > + cs-gpios = <&gpio5 25 GPIO_ACTIVE_LOW>, <&gpio4 19 > > > > > GPIO_ACTIVE_LOW>; > > > > > pinctrl-names = "default"; > > > > > - pinctrl-0 = <&pinctrl_ecspi3>; > > > > > + pinctrl-0 = <&pinctrl_ecspi3>, <&pinctrl_pmic_tpm_ena>; > > > > > > > > Would it make more sense to have tpm pinctrl in node tpm@1 below? > > > It's the pinctrl of the SPI Chip Select pin, not something about the > > > TPM, I think it's correct to have it into the ecspi node. > > > > The name pinctrl_pmic_tpm_ena seems confusing then. > > I agree (this is coming from the schematics net name, let's blame the HW > folks). > > With that said, let's rename this to `pinctrl_tpm_spi_cs`. Vitor? I will prepare a v2 with this small change. Vitor Soares > > Francesco >
diff --git a/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi index 4768b05fd765..c9ae5f0bb526 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi @@ -227,15 +227,16 @@ &ecspi2 { pinctrl-0 = <&pinctrl_ecspi2>; }; -/* Verdin CAN_1 (On-module) */ +/* On-module SPI */ &ecspi3 { #address-cells = <1>; #size-cells = <0>; - cs-gpios = <&gpio5 25 GPIO_ACTIVE_LOW>; + cs-gpios = <&gpio5 25 GPIO_ACTIVE_LOW>, <&gpio4 19 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_ecspi3>; + pinctrl-0 = <&pinctrl_ecspi3>, <&pinctrl_pmic_tpm_ena>; status = "okay"; + /* Verdin CAN_1 */ can1: can@0 { compatible = "microchip,mcp251xfd"; clocks = <&clk40m>; @@ -245,6 +246,12 @@ can1: can@0 { reg = <0>; spi-max-frequency = <8500000>; }; + + verdin_som_tpm: tpm@1 { + compatible = "atmel,attpm20p", "tcg,tpm_tis-spi"; + reg = <0x1>; + spi-max-frequency = <36000000>; + }; }; /* Verdin ETH_1 (On-module PHY) */ @@ -807,8 +814,7 @@ &iomuxc { pinctrl-0 = <&pinctrl_gpio1>, <&pinctrl_gpio2>, <&pinctrl_gpio3>, <&pinctrl_gpio4>, <&pinctrl_gpio7>, <&pinctrl_gpio8>, - <&pinctrl_gpio_hog1>, <&pinctrl_gpio_hog2>, <&pinctrl_gpio_hog3>, - <&pinctrl_pmic_tpm_ena>; + <&pinctrl_gpio_hog1>, <&pinctrl_gpio_hog2>, <&pinctrl_gpio_hog3>; pinctrl_can1_int: can1intgrp { fsl,pins =