mbox series

[0/5] Enable I2C in SPL, support runtime detection of add-on board

Message ID 1590170608-12229-1-git-send-email-sunil@amarulasolutions.com
Headers show
Series Enable I2C in SPL, support runtime detection of add-on board | expand

Message

Suniel Mahesh May 22, 2020, 6:03 p.m. UTC
From: Suniel Mahesh <sunil@amarulasolutions.com>

This patch series adds runtime detection of add-on board(ROC-RK3399-PC Mezzanine) by
enabling I2C in SPL.
This add on board hosts a CW2015 chip which is connected as slave to I2C2. In order
to dynamically detect this add-on board at runtime, I2C2 is probed in SPL. If probe
is successfull then a corresponding dtb is loaded, else regular dtb is loaded for
the u-boot proper.

Patch #1 moves board initialiation code after rk3399 init is done. Patch #2 enables
I2C in SPL for any add-on board detection at run time. Patch #3 adds support for
add-on board run-time detection. Patch #4 drops ROC-RK3399-PC Mezzanine board as this
is an add-on board, it will be detected at runtime. Patch #5 enables PCIe/M.2 and NVMe,
as this add-on board has a PCIe/M.2.

Jagan Teki (1):
  rockchip: spl: Move board_early_init_f after cpu timer

Suniel Mahesh (4):
  roc-pc-rk3399: Enable I2C in SPL for add-on board detection
  roc-pc-rk3399: Add support for add-on board run-time detection
  rk3399: drop ROC-RK3399-PC Mezzanine board
  roc-pc-rk3399: Enable PCIe/M.2, NVMe

 arch/arm/dts/rk3399-roc-pc-u-boot.dtsi      | 13 +++++
 arch/arm/mach-rockchip/spl.c                |  5 +-
 board/firefly/roc-pc-rk3399/MAINTAINERS     |  2 -
 board/firefly/roc-pc-rk3399/roc-pc-rk3399.c | 56 ++++++++++++++++++++++
 configs/roc-pc-mezzanine-rk3399_defconfig   | 74 -----------------------------
 configs/roc-pc-rk3399_defconfig             | 10 +++-
 6 files changed, 81 insertions(+), 79 deletions(-)
 delete mode 100644 configs/roc-pc-mezzanine-rk3399_defconfig

Comments

Chen-Yu Tsai May 23, 2020, 2:07 a.m. UTC | #1
Hi,

On Sat, May 23, 2020 at 2:04 AM <sunil@amarulasolutions.com> wrote:
>
> From: Suniel Mahesh <sunil@amarulasolutions.com>
>
> This patch series adds runtime detection of add-on board(ROC-RK3399-PC Mezzanine) by
> enabling I2C in SPL.
> This add on board hosts a CW2015 chip which is connected as slave to I2C2. In order
> to dynamically detect this add-on board at runtime, I2C2 is probed in SPL. If probe
> is successfull then a corresponding dtb is loaded, else regular dtb is loaded for
> the u-boot proper.
>
> Patch #1 moves board initialiation code after rk3399 init is done. Patch #2 enables
> I2C in SPL for any add-on board detection at run time. Patch #3 adds support for
> add-on board run-time detection. Patch #4 drops ROC-RK3399-PC Mezzanine board as this
> is an add-on board, it will be detected at runtime. Patch #5 enables PCIe/M.2 and NVMe,
> as this add-on board has a PCIe/M.2.
>
> Jagan Teki (1):
>   rockchip: spl: Move board_early_init_f after cpu timer
>
> Suniel Mahesh (4):
>   roc-pc-rk3399: Enable I2C in SPL for add-on board detection
>   roc-pc-rk3399: Add support for add-on board run-time detection
>   rk3399: drop ROC-RK3399-PC Mezzanine board
>   roc-pc-rk3399: Enable PCIe/M.2, NVMe
>
>  arch/arm/dts/rk3399-roc-pc-u-boot.dtsi      | 13 +++++
>  arch/arm/mach-rockchip/spl.c                |  5 +-
>  board/firefly/roc-pc-rk3399/MAINTAINERS     |  2 -
>  board/firefly/roc-pc-rk3399/roc-pc-rk3399.c | 56 ++++++++++++++++++++++
>  configs/roc-pc-mezzanine-rk3399_defconfig   | 74 -----------------------------


FYI this is going to be problematic for people that have the non-POE
version of the
mezzanine board and still want to access NVMe from U-boot. Maybe worth keeping a
target for these people to use.

ChenYu

>  configs/roc-pc-rk3399_defconfig             | 10 +++-
>  6 files changed, 81 insertions(+), 79 deletions(-)
>  delete mode 100644 configs/roc-pc-mezzanine-rk3399_defconfig
>
> --
> 2.7.4
>
Kever Yang May 29, 2020, 9:54 a.m. UTC | #2
Hi Suniel,

     Any idea bout ChenYu's comment?


Thanks,

- Kever

On 2020/5/23 上午10:07, Chen-Yu Tsai wrote:
> Hi,
>
> On Sat, May 23, 2020 at 2:04 AM <sunil@amarulasolutions.com> wrote:
>> From: Suniel Mahesh <sunil@amarulasolutions.com>
>>
>> This patch series adds runtime detection of add-on board(ROC-RK3399-PC Mezzanine) by
>> enabling I2C in SPL.
>> This add on board hosts a CW2015 chip which is connected as slave to I2C2. In order
>> to dynamically detect this add-on board at runtime, I2C2 is probed in SPL. If probe
>> is successfull then a corresponding dtb is loaded, else regular dtb is loaded for
>> the u-boot proper.
>>
>> Patch #1 moves board initialiation code after rk3399 init is done. Patch #2 enables
>> I2C in SPL for any add-on board detection at run time. Patch #3 adds support for
>> add-on board run-time detection. Patch #4 drops ROC-RK3399-PC Mezzanine board as this
>> is an add-on board, it will be detected at runtime. Patch #5 enables PCIe/M.2 and NVMe,
>> as this add-on board has a PCIe/M.2.
>>
>> Jagan Teki (1):
>>    rockchip: spl: Move board_early_init_f after cpu timer
>>
>> Suniel Mahesh (4):
>>    roc-pc-rk3399: Enable I2C in SPL for add-on board detection
>>    roc-pc-rk3399: Add support for add-on board run-time detection
>>    rk3399: drop ROC-RK3399-PC Mezzanine board
>>    roc-pc-rk3399: Enable PCIe/M.2, NVMe
>>
>>   arch/arm/dts/rk3399-roc-pc-u-boot.dtsi      | 13 +++++
>>   arch/arm/mach-rockchip/spl.c                |  5 +-
>>   board/firefly/roc-pc-rk3399/MAINTAINERS     |  2 -
>>   board/firefly/roc-pc-rk3399/roc-pc-rk3399.c | 56 ++++++++++++++++++++++
>>   configs/roc-pc-mezzanine-rk3399_defconfig   | 74 -----------------------------
>
> FYI this is going to be problematic for people that have the non-POE
> version of the
> mezzanine board and still want to access NVMe from U-boot. Maybe worth keeping a
> target for these people to use.
>
> ChenYu
>
>>   configs/roc-pc-rk3399_defconfig             | 10 +++-
>>   6 files changed, 81 insertions(+), 79 deletions(-)
>>   delete mode 100644 configs/roc-pc-mezzanine-rk3399_defconfig
>>
>> --
>> 2.7.4
>>
>
Jagan Teki May 29, 2020, 11:06 a.m. UTC | #3
Hi Kever,

On Fri, May 29, 2020 at 3:25 PM Kever Yang <kever.yang@rock-chips.com> wrote:
>
> Hi Suniel,
>
>      Any idea bout ChenYu's comment?

Yes, ChenYu's point is valid, right now we are in communication with
Libretech about the I/O differences to differentiate baseboard vs
expansion. We will come back with proper solutions.

Jagan.