Dear Marek,

> From: Marek Vasut <[email protected]>
> Sent: vendredi 10 avril 2020 20:56
> 
> The AV96 board does exist in multiple variants. To cater for all of them, 
> implement
> board code handling. There are two GPIOs which code the type of the board, 
> read
> them out and use the value to pick the correct device tree from an fitImage.
> 
> Signed-off-by: Marek Vasut <[email protected]>
> Cc: Manivannan Sadhasivam <[email protected]>
> Cc: Patrick Delaunay <[email protected]>
> Cc: Patrice Chotard <[email protected]>
> ---
> V2: No change
> ---
>  arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi    |  3 +
>  .../stm32mp15xx-dhcor-avenger96-u-boot.dtsi   |  1 +
>  arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi    |  9 +++
>  board/dhelectronics/dh_stm32mp1/Kconfig       |  2 +-
>  board/dhelectronics/dh_stm32mp1/board.c       | 61 +++++++++++++++++++
>  .../dh_stm32mp1/u-boot-dhcom.its              | 39 ++++++++++++
>  .../dh_stm32mp1/u-boot-dhcor.its              | 39 ++++++++++++
>  configs/stm32mp15_dhcom_basic_defconfig       |  3 +
>  configs/stm32mp15_dhcor_basic_defconfig       |  3 +
>  include/configs/dh_stm32mp1.h                 | 15 +++++
>  10 files changed, 174 insertions(+), 1 deletion(-)  create mode 100644
> board/dhelectronics/dh_stm32mp1/u-boot-dhcom.its
>  create mode 100644 board/dhelectronics/dh_stm32mp1/u-boot-dhcor.its
>  create mode 100644 include/configs/dh_stm32mp1.h
> 
> diff --git a/arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi
> b/arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi
> index eba3588540..fcdc5e6859 100644
> --- a/arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi
> +++ b/arch/arm/dts/stm32mp15xx-dhcom-u-boot.dtsi
> @@ -19,10 +19,13 @@
>       };
> 
>       config {
> +             u-boot,dm-pre-reloc;

No needed to add " u-boot,dm-pre-reloc" for config, it is always available.

>               u-boot,boot-led = "heartbeat";
>               u-boot,error-led = "error";
>               st,fastboot-gpios = <&gpioa 13 GPIO_ACTIVE_LOW>;
>               st,stm32prog-gpios = <&gpioa 14 GPIO_ACTIVE_LOW>;
> +             #gpio-cells = <2>;

#gpio-cells, No needed in config, only in gpio-controller

> +             dh,som-coding-gpios = <&gpiof 12 0>, <&gpiof 13 0>, <&gpiof 15
> 0>;
>       };
> 
>       led {
> diff --git a/arch/arm/dts/stm32mp15xx-dhcor-avenger96-u-boot.dtsi
> b/arch/arm/dts/stm32mp15xx-dhcor-avenger96-u-boot.dtsi
> index 4207a96618..7ccec95f15 100644
> --- a/arch/arm/dts/stm32mp15xx-dhcor-avenger96-u-boot.dtsi
> +++ b/arch/arm/dts/stm32mp15xx-dhcor-avenger96-u-boot.dtsi
> @@ -15,6 +15,7 @@
>       config {
>               u-boot,boot-led = "led1";
>               u-boot,error-led = "led4";
> +             dh,board-coding-gpios = <&gpiog 13 0>, <&gpiod 9 0>;
>       };
>  };
> 
> diff --git a/arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi
> b/arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi
> index 02dad81b0b..17a23ae21c 100644
> --- a/arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi
> +++ b/arch/arm/dts/stm32mp15xx-dhcor-u-boot.dtsi
> @@ -11,6 +11,15 @@
>  #include "stm32mp157-u-boot.dtsi"
>  #include "stm32mp15-ddr3-2x4Gb-1066-binG.dtsi"
> 
> +/ {
> +     u-boot,dm-pre-reloc;
> +     config {
> +             u-boot,dm-pre-reloc;
> +             #gpio-cells = <2>;

Dito: 2 lines not needed

> +             dh,som-coding-gpios = <&gpioz 7 0>, <&gpiof 3 0>;
> +     };
> +};
> +
>  &i2c4 {
>       u-boot,dm-pre-reloc;
>  };

[...]

Few minor remarks on device tree.

Anyway, the rest is OK for me

Reviewed-by: Patrick Delaunay <[email protected]>

Thanks

Patrick

> --
> 2.25.1

Reply via email to