Re: [PATCH 0/4] rockchip: Improve support for Bob chromebook and add support for Kevin
On 08/12/2021 12:31, Peter Robinson wrote: > I thought there was a different process for the chtomebooks than the > usual rockchip route. Do the rockchip chomebooks support writing to a > space in SPI and chainloading like some of the other arm chtomebooks > did (I think tegra/samsung but my memory fades there)? I think it > would be useful to document the rockchip chromebook options somewhere > so that people that are interested in using the U-Boot option have > some resources, we've had a few queries over the time around that. What I usually do is exactly that, chainloading from an SPI region called RW_LEGACY. This is the predecessor of the 'altfw' feature mentioned in doc/chromium/overview.rst, there's a link there that leads to some information about this as well. In short it goes like this: - Build U-Boot with CONFIG_OF_EMBED=y (or do some objcopy/elfedit magic to merge dtb into u-boot ELF) - cbfstool "u-boot.cbfs" create -s "$((2 * 1024 * 1024))" -m arm64 - cbfstool "u-boot.cbfs" add-payload -f "u-boot" -n payload -c lzma - dd if="u-boot.cbfs" of="u-boot.cbfs.rom" bs=2M seek=3 count=1 - sudo flashrom -p linux_mtd --fmap -i RW_LEGACY -w "u-boot.cbfs.rom" - Reboot and press CTRL+L on Chrome OS developer mode screen There's also the doc/chromium/chainload.rst process which packs U-Boot as if it's the Chrome OS kernel on a disk. I couldn't manage to boot U-Boot that way, but I somewhat automated that process with binman. I think I can automate the RW_LEGACY image as well but haven't tried it. I could document what I know as is, but wanted to do it after I get those files automated during upstream build, as things should be quite simple after that.
Re: [PATCH 0/4] rockchip: Improve support for Bob chromebook and add support for Kevin
On Fri, Dec 3, 2021 at 8:13 PM Simon Glass wrote: > > Hi Peter, > > On Fri, 3 Dec 2021 at 05:20, Peter Robinson wrote: > > > > On Fri, Dec 3, 2021 at 3:32 AM Simon Glass wrote: > > > > > > Hi Peter, > > > > > > On Wed, 1 Dec 2021 at 07:23, Peter Robinson wrote: > > > > > > > > On Thu, Nov 25, 2021 at 5:39 PM Alper Nebi Yasak > > > > wrote: > > > > > > > > > > I have recently started testing booting U-Boot from SPI on my > > > > > gru-kevin > > > > > (as opposed to chainloading it from vendor coreboot + depthcharge) and > > > > > brought it to a better working state based on an initial support patch > > > > > from Marty [1][2] and some follow-up work by Simon [3]. > > > > > > > > > > I tried to keep them as the git author when I took things from their > > > > > work, but squashing other changes into those and rewriting commit > > > > > messages makes things a bit weird in my opinion, especially for > > > > > keeping > > > > > their signoff. Do tell me if there is a better way to that. > > > > > > > > > > As the Kevin and Bob boards are very similar. I assumed the config and > > > > > devicetree changes will be appropriate for Bob as well, and applied > > > > > them > > > > > to it first. I do not have a Bob, so could not test on one myself, but > > > > > Simon did test an earlier version of this and it appears to work [4]. > > > > > > > > > > Other useful things for these boards: > > > > > - Patch to fix a hang when usb controllers exit [5] > > > > > - Series to support HS400ES mode as HS400 training fails [6] > > > > > - Hack to skip eMMC reinitialization so it keeps working [7] > > > > > > > > Is there docs updates to be done in doc/chromium/ for this so people > > > > know how to use it ? > > > > > > This is for bare-metal use though, so it isn't anything to do with > > > Chromium at present. > > > > So are there docs for how do this? I didn't manage to find any, > > although the docs I find can be a little over the place in U-Boot so > > they may be there and I missed them, so either way docs would be fab. > > There are SPI instructions at doc/board/rockchip but they are pretty > 'one way'. So you would need a way to get your old SPI-flash contents > back when it doesn't work, because I don't think these platforms > support SD boot. I use a 'servo' board and a Dediprog em100 SPI > emulator. I know that kevin does not support CCD (Close-Case > Debugging) so you cannot program the SPI flash that way... I thought there was a different process for the chtomebooks than the usual rockchip route. Do the rockchip chomebooks support writing to a space in SPI and chainloading like some of the other arm chtomebooks did (I think tegra/samsung but my memory fades there)? I think it would be useful to document the rockchip chromebook options somewhere so that people that are interested in using the U-Boot option have some resources, we've had a few queries over the time around that. Peter
Re: [PATCH 0/4] rockchip: Improve support for Bob chromebook and add support for Kevin
On 03/12/2021 23:13, Simon Glass wrote: > On Fri, 3 Dec 2021 at 05:20, Peter Robinson wrote: >> On Fri, Dec 3, 2021 at 3:32 AM Simon Glass wrote: >>> On Wed, 1 Dec 2021 at 07:23, Peter Robinson wrote: On Thu, Nov 25, 2021 at 5:39 PM Alper Nebi Yasak wrote: > > I have recently started testing booting U-Boot from SPI on my gru-kevin > (as opposed to chainloading it from vendor coreboot + depthcharge) and > [...] Is there docs updates to be done in doc/chromium/ for this so people know how to use it ? I tried to document how I'm using this at my GitHub wiki [1]. I want to eventually rework that for U-Boot docs, but I feel I need to explore chromium things a bit more, and want to solve the major problems with these boards before doing that exploration. [1] https://github.com/alpernebbi/u-boot/wiki >>> This is for bare-metal use though, so it isn't anything to do with >>> Chromium at present. >> >> So are there docs for how do this? I didn't manage to find any, >> although the docs I find can be a little over the place in U-Boot so >> they may be there and I missed them, so either way docs would be fab. > > There are SPI instructions at doc/board/rockchip but they are pretty > 'one way'. So you would need a way to get your old SPI-flash contents > back when it doesn't work, because I don't think these platforms > support SD boot. I use a 'servo' board and a Dediprog em100 SPI > emulator. I know that kevin does not support CCD (Close-Case > Debugging) so you cannot program the SPI flash that way... The doc/board/rockchip instructions are slightly outdated in that they don't mention u-boot.rom, it's enough just to flash that whichever way possible. There's also the additional prerequisite of disabling write-protection, which I tried to explain a bit in that wiki as well. I can usually flash things from U-Boot/Linux, but when I flash a bad build I do have to use my CH341A + 1.8V adapter to recover from it. I don't know if booting from an SD card is outright impossible on these boards, but current config doesn't even have the devices enabled in SPL, and I couldn't get it to work with my naive blind attempts.
Re: [PATCH 0/4] rockchip: Improve support for Bob chromebook and add support for Kevin
On 03/12/2021 06:31, Simon Glass wrote: > On Thu, 25 Nov 2021 at 10:39, Alper Nebi Yasak > wrote: >> I have recently started testing booting U-Boot from SPI on my gru-kevin >> >> [...] >> >> Other useful things for these boards: >> - Patch to fix a hang when usb controllers exit [5] >> - Series to support HS400ES mode as HS400 training fails [6] >> - Hack to skip eMMC reinitialization so it keeps working [7] >> >> [5] >> https://patchwork.ozlabs.org/project/uboot/patch/20210406151059.1187379-1-icen...@aosc.io/ >> [6] https://patchwork.ozlabs.org/project/uboot/list/?series=269768 >> [7] https://patchwork.ozlabs.org/comment/2779784/ > > My test results below. It seems that MMC is broken (I think by a > previous change). The garbage on the console with kevin is new but may > be unrelated to your patches, not sure. So it seems that your patches > work for me on both. The eMMC failure is because I've also enabled HS400ES configs, assuming my series for that (see quoted above) would get merged before these. Sorry I wasn't clear enough about that. Should I disable those? I have no idea about the console garbage.
Re: [PATCH 0/4] rockchip: Improve support for Bob chromebook and add support for Kevin
Hi Peter, On Fri, 3 Dec 2021 at 05:20, Peter Robinson wrote: > > On Fri, Dec 3, 2021 at 3:32 AM Simon Glass wrote: > > > > Hi Peter, > > > > On Wed, 1 Dec 2021 at 07:23, Peter Robinson wrote: > > > > > > On Thu, Nov 25, 2021 at 5:39 PM Alper Nebi Yasak > > > wrote: > > > > > > > > I have recently started testing booting U-Boot from SPI on my gru-kevin > > > > (as opposed to chainloading it from vendor coreboot + depthcharge) and > > > > brought it to a better working state based on an initial support patch > > > > from Marty [1][2] and some follow-up work by Simon [3]. > > > > > > > > I tried to keep them as the git author when I took things from their > > > > work, but squashing other changes into those and rewriting commit > > > > messages makes things a bit weird in my opinion, especially for keeping > > > > their signoff. Do tell me if there is a better way to that. > > > > > > > > As the Kevin and Bob boards are very similar. I assumed the config and > > > > devicetree changes will be appropriate for Bob as well, and applied them > > > > to it first. I do not have a Bob, so could not test on one myself, but > > > > Simon did test an earlier version of this and it appears to work [4]. > > > > > > > > Other useful things for these boards: > > > > - Patch to fix a hang when usb controllers exit [5] > > > > - Series to support HS400ES mode as HS400 training fails [6] > > > > - Hack to skip eMMC reinitialization so it keeps working [7] > > > > > > Is there docs updates to be done in doc/chromium/ for this so people > > > know how to use it ? > > > > This is for bare-metal use though, so it isn't anything to do with > > Chromium at present. > > So are there docs for how do this? I didn't manage to find any, > although the docs I find can be a little over the place in U-Boot so > they may be there and I missed them, so either way docs would be fab. There are SPI instructions at doc/board/rockchip but they are pretty 'one way'. So you would need a way to get your old SPI-flash contents back when it doesn't work, because I don't think these platforms support SD boot. I use a 'servo' board and a Dediprog em100 SPI emulator. I know that kevin does not support CCD (Close-Case Debugging) so you cannot program the SPI flash that way... Regards, Simon
Re: [PATCH 0/4] rockchip: Improve support for Bob chromebook and add support for Kevin
On Fri, Dec 3, 2021 at 3:32 AM Simon Glass wrote: > > Hi Peter, > > On Wed, 1 Dec 2021 at 07:23, Peter Robinson wrote: > > > > On Thu, Nov 25, 2021 at 5:39 PM Alper Nebi Yasak > > wrote: > > > > > > I have recently started testing booting U-Boot from SPI on my gru-kevin > > > (as opposed to chainloading it from vendor coreboot + depthcharge) and > > > brought it to a better working state based on an initial support patch > > > from Marty [1][2] and some follow-up work by Simon [3]. > > > > > > I tried to keep them as the git author when I took things from their > > > work, but squashing other changes into those and rewriting commit > > > messages makes things a bit weird in my opinion, especially for keeping > > > their signoff. Do tell me if there is a better way to that. > > > > > > As the Kevin and Bob boards are very similar. I assumed the config and > > > devicetree changes will be appropriate for Bob as well, and applied them > > > to it first. I do not have a Bob, so could not test on one myself, but > > > Simon did test an earlier version of this and it appears to work [4]. > > > > > > Other useful things for these boards: > > > - Patch to fix a hang when usb controllers exit [5] > > > - Series to support HS400ES mode as HS400 training fails [6] > > > - Hack to skip eMMC reinitialization so it keeps working [7] > > > > Is there docs updates to be done in doc/chromium/ for this so people > > know how to use it ? > > This is for bare-metal use though, so it isn't anything to do with > Chromium at present. So are there docs for how do this? I didn't manage to find any, although the docs I find can be a little over the place in U-Boot so they may be there and I missed them, so either way docs would be fab.
Re: [PATCH 0/4] rockchip: Improve support for Bob chromebook and add support for Kevin
Hi Peter, On Wed, 1 Dec 2021 at 07:23, Peter Robinson wrote: > > On Thu, Nov 25, 2021 at 5:39 PM Alper Nebi Yasak > wrote: > > > > I have recently started testing booting U-Boot from SPI on my gru-kevin > > (as opposed to chainloading it from vendor coreboot + depthcharge) and > > brought it to a better working state based on an initial support patch > > from Marty [1][2] and some follow-up work by Simon [3]. > > > > I tried to keep them as the git author when I took things from their > > work, but squashing other changes into those and rewriting commit > > messages makes things a bit weird in my opinion, especially for keeping > > their signoff. Do tell me if there is a better way to that. > > > > As the Kevin and Bob boards are very similar. I assumed the config and > > devicetree changes will be appropriate for Bob as well, and applied them > > to it first. I do not have a Bob, so could not test on one myself, but > > Simon did test an earlier version of this and it appears to work [4]. > > > > Other useful things for these boards: > > - Patch to fix a hang when usb controllers exit [5] > > - Series to support HS400ES mode as HS400 training fails [6] > > - Hack to skip eMMC reinitialization so it keeps working [7] > > Is there docs updates to be done in doc/chromium/ for this so people > know how to use it ? This is for bare-metal use though, so it isn't anything to do with Chromium at present. Regards, Simon
Re: [PATCH 0/4] rockchip: Improve support for Bob chromebook and add support for Kevin
Hi Alper, On Thu, 25 Nov 2021 at 10:39, Alper Nebi Yasak wrote: > > I have recently started testing booting U-Boot from SPI on my gru-kevin > (as opposed to chainloading it from vendor coreboot + depthcharge) and > brought it to a better working state based on an initial support patch > from Marty [1][2] and some follow-up work by Simon [3]. > > I tried to keep them as the git author when I took things from their > work, but squashing other changes into those and rewriting commit > messages makes things a bit weird in my opinion, especially for keeping > their signoff. Do tell me if there is a better way to that. > > As the Kevin and Bob boards are very similar. I assumed the config and > devicetree changes will be appropriate for Bob as well, and applied them > to it first. I do not have a Bob, so could not test on one myself, but > Simon did test an earlier version of this and it appears to work [4]. > > Other useful things for these boards: > - Patch to fix a hang when usb controllers exit [5] > - Series to support HS400ES mode as HS400 training fails [6] > - Hack to skip eMMC reinitialization so it keeps working [7] > > [1] https://patchwork.ozlabs.org/patch/1053386/ > [2] https://patchwork.ozlabs.org/comment/2488899/ > [3] https://github.com/sjg20/u-boot/commits/kevin > [4] > https://lore.kernel.org/u-boot/capnjgz23jd92y9ni8yw1ftl0a1sjhgouoakx13zkokn6t-s...@mail.gmail.com/ > [5] > https://patchwork.ozlabs.org/project/uboot/patch/20210406151059.1187379-1-icen...@aosc.io/ > [6] https://patchwork.ozlabs.org/project/uboot/list/?series=269768 > [7] https://patchwork.ozlabs.org/comment/2779784/ > > > Alper Nebi Yasak (2): > rockchip: gru: Set up SoC IO domain registers > rockchip: bob: Enable more configs > > Marty E. Plummer (1): > rockchip: rk3399: Add support for chromebook_kevin > > Simon Glass (1): > rockchip: gru: Add more devicetree settings > > arch/arm/dts/Makefile | 1 + > arch/arm/dts/rk3399-gru-kevin-u-boot.dtsi | 11 ++ > arch/arm/dts/rk3399-gru-u-boot.dtsi | 55 + > arch/arm/mach-rockchip/rk3399/Kconfig | 11 ++ > arch/arm/mach-rockchip/rk3399/rk3399.c| 4 +- > arch/arm/mach-rockchip/spl.c | 3 +- > board/google/gru/Kconfig | 16 +++ > board/google/gru/MAINTAINERS | 8 ++ > board/google/gru/gru.c| 56 - > configs/chromebook_bob_defconfig | 27 +++- > configs/chromebook_kevin_defconfig| 116 ++ > doc/board/rockchip/rockchip.rst | 1 + > include/configs/gru.h | 3 + > include/dt-bindings/input/linux-event-codes.h | 3 +- > 14 files changed, 309 insertions(+), 6 deletions(-) > create mode 100644 arch/arm/dts/rk3399-gru-kevin-u-boot.dtsi > create mode 100644 configs/chromebook_kevin_defconfig > > -- > 2.34.0 > My test results below. It seems that MMC is broken (I think by a previous change). The garbage on the console with kevin is new but may be unrelated to your patches, not sure. So it seems that your patches work for me on both. Bob: do-try-int.sh bob Revision 68acce8a08beb24618343a1ce7ee6c0c4c234b97, board bob Checking revision 68acce8a08beb24618343a1ce7ee6c0c4c234b97 /vid/software/devel/ubtest tbot starting ... ├─Parameters: │ rev= '68acce8a08beb24618343a1ce7ee6c0c4c234b97' │ clean = False ├─Calling uboot_build_and_flash ... │ ├─bob is on port 9904 and uses /dev/pts/37 │ ├─Calling uboot_build ... │ │ ├─Calling uboot_checkout ... │ │ │ ├─Builder: bob │ │ │ └─Done. (1.104s) │ │ ├─Configuring build ... │ │ ├─Calling uboot_make ... │ │ │ └─Done. (10.289s) │ │ └─Done. (11.767s) │ ├─Calling uboot_flash ... │ │ └─Done. (2.209s) │ └─Done. (14.438s) ├─ └─SUCCESS (16.780s) tbot starting ... ├─Calling interactive_board ... │ ├─bob is on port 9904 and uses /dev/pts/37 │ ├─POWERON (bob) │ ├─Entering interactive shell (CTRL+D to exit) ... Channel 0: LPDDR3, 933MHz BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB Channel 1: LPDDR3, 933MHz BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB 256B stride U-Boot SPL 2022.01-rc3-00130-g68acce8a08b (Dec 02 2021 - 20:05:54 -0700) Trying to boot from SPI rockchip_rk3399_pinctrl pinctrl: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19 rockchip_rk3399_pinctrl pinctrl: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19 ns16550_serial serial@ff1a: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19 U-Boot 2022.01-rc3-00130-g68acce8a08b (Dec 02 2021 - 20:05:54 -0700) Model: Google Bob DRAM: 3.9 GiB MMC: mmc@fe32: 1, mmc@fe33: 0 Loading Environment from MMC... Select HS400ES failed -524 unable to select a mode : -5 *** Warning - No block device, using default environment In:cros-ec-keyb
Re: [PATCH 0/4] rockchip: Improve support for Bob chromebook and add support for Kevin
On Thu, Nov 25, 2021 at 5:39 PM Alper Nebi Yasak wrote: > > I have recently started testing booting U-Boot from SPI on my gru-kevin > (as opposed to chainloading it from vendor coreboot + depthcharge) and > brought it to a better working state based on an initial support patch > from Marty [1][2] and some follow-up work by Simon [3]. > > I tried to keep them as the git author when I took things from their > work, but squashing other changes into those and rewriting commit > messages makes things a bit weird in my opinion, especially for keeping > their signoff. Do tell me if there is a better way to that. > > As the Kevin and Bob boards are very similar. I assumed the config and > devicetree changes will be appropriate for Bob as well, and applied them > to it first. I do not have a Bob, so could not test on one myself, but > Simon did test an earlier version of this and it appears to work [4]. > > Other useful things for these boards: > - Patch to fix a hang when usb controllers exit [5] > - Series to support HS400ES mode as HS400 training fails [6] > - Hack to skip eMMC reinitialization so it keeps working [7] Is there docs updates to be done in doc/chromium/ for this so people know how to use it ? > [1] https://patchwork.ozlabs.org/patch/1053386/ > [2] https://patchwork.ozlabs.org/comment/2488899/ > [3] https://github.com/sjg20/u-boot/commits/kevin > [4] > https://lore.kernel.org/u-boot/capnjgz23jd92y9ni8yw1ftl0a1sjhgouoakx13zkokn6t-s...@mail.gmail.com/ > [5] > https://patchwork.ozlabs.org/project/uboot/patch/20210406151059.1187379-1-icen...@aosc.io/ > [6] https://patchwork.ozlabs.org/project/uboot/list/?series=269768 > [7] https://patchwork.ozlabs.org/comment/2779784/ > > > Alper Nebi Yasak (2): > rockchip: gru: Set up SoC IO domain registers > rockchip: bob: Enable more configs > > Marty E. Plummer (1): > rockchip: rk3399: Add support for chromebook_kevin > > Simon Glass (1): > rockchip: gru: Add more devicetree settings > > arch/arm/dts/Makefile | 1 + > arch/arm/dts/rk3399-gru-kevin-u-boot.dtsi | 11 ++ > arch/arm/dts/rk3399-gru-u-boot.dtsi | 55 + > arch/arm/mach-rockchip/rk3399/Kconfig | 11 ++ > arch/arm/mach-rockchip/rk3399/rk3399.c| 4 +- > arch/arm/mach-rockchip/spl.c | 3 +- > board/google/gru/Kconfig | 16 +++ > board/google/gru/MAINTAINERS | 8 ++ > board/google/gru/gru.c| 56 - > configs/chromebook_bob_defconfig | 27 +++- > configs/chromebook_kevin_defconfig| 116 ++ > doc/board/rockchip/rockchip.rst | 1 + > include/configs/gru.h | 3 + > include/dt-bindings/input/linux-event-codes.h | 3 +- > 14 files changed, 309 insertions(+), 6 deletions(-) > create mode 100644 arch/arm/dts/rk3399-gru-kevin-u-boot.dtsi > create mode 100644 configs/chromebook_kevin_defconfig > > -- > 2.34.0 >
[PATCH 0/4] rockchip: Improve support for Bob chromebook and add support for Kevin
I have recently started testing booting U-Boot from SPI on my gru-kevin (as opposed to chainloading it from vendor coreboot + depthcharge) and brought it to a better working state based on an initial support patch from Marty [1][2] and some follow-up work by Simon [3]. I tried to keep them as the git author when I took things from their work, but squashing other changes into those and rewriting commit messages makes things a bit weird in my opinion, especially for keeping their signoff. Do tell me if there is a better way to that. As the Kevin and Bob boards are very similar. I assumed the config and devicetree changes will be appropriate for Bob as well, and applied them to it first. I do not have a Bob, so could not test on one myself, but Simon did test an earlier version of this and it appears to work [4]. Other useful things for these boards: - Patch to fix a hang when usb controllers exit [5] - Series to support HS400ES mode as HS400 training fails [6] - Hack to skip eMMC reinitialization so it keeps working [7] [1] https://patchwork.ozlabs.org/patch/1053386/ [2] https://patchwork.ozlabs.org/comment/2488899/ [3] https://github.com/sjg20/u-boot/commits/kevin [4] https://lore.kernel.org/u-boot/capnjgz23jd92y9ni8yw1ftl0a1sjhgouoakx13zkokn6t-s...@mail.gmail.com/ [5] https://patchwork.ozlabs.org/project/uboot/patch/20210406151059.1187379-1-icen...@aosc.io/ [6] https://patchwork.ozlabs.org/project/uboot/list/?series=269768 [7] https://patchwork.ozlabs.org/comment/2779784/ Alper Nebi Yasak (2): rockchip: gru: Set up SoC IO domain registers rockchip: bob: Enable more configs Marty E. Plummer (1): rockchip: rk3399: Add support for chromebook_kevin Simon Glass (1): rockchip: gru: Add more devicetree settings arch/arm/dts/Makefile | 1 + arch/arm/dts/rk3399-gru-kevin-u-boot.dtsi | 11 ++ arch/arm/dts/rk3399-gru-u-boot.dtsi | 55 + arch/arm/mach-rockchip/rk3399/Kconfig | 11 ++ arch/arm/mach-rockchip/rk3399/rk3399.c| 4 +- arch/arm/mach-rockchip/spl.c | 3 +- board/google/gru/Kconfig | 16 +++ board/google/gru/MAINTAINERS | 8 ++ board/google/gru/gru.c| 56 - configs/chromebook_bob_defconfig | 27 +++- configs/chromebook_kevin_defconfig| 116 ++ doc/board/rockchip/rockchip.rst | 1 + include/configs/gru.h | 3 + include/dt-bindings/input/linux-event-codes.h | 3 +- 14 files changed, 309 insertions(+), 6 deletions(-) create mode 100644 arch/arm/dts/rk3399-gru-kevin-u-boot.dtsi create mode 100644 configs/chromebook_kevin_defconfig -- 2.34.0