Skip to content

arm: rpi: Enable USB, Ethernet, MMC, Video driver model on Raspberry Pi

Simon Glass u-boot 6 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 posting 4/40 of 17 patches 0 repliesNew
  2. v6 Latest18 patches 0 repliesNew
  3. v519 patches 0 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v4 posting 3/40 of 17 patches0 repliesSuperseded
v4 posting 2/40 of 17 patches0 repliesSuperseded
v4 posting 1/417 patches0 repliesSuperseded

Changes in v6 from the cover letter

- Drop changes to dwc2.c now we have http://patchwork.ozlabs.org/patch/746917/
- Rebase to master

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/18net: smsc95xx: Correct free_pkt() implementationdrivers/usb/eth/smsc95xx.c+2 -21 reply
2/18dm: mmc: Set up the MMC device when controller is probeddrivers/mmc/mmc-uclass.c+12 -00 replies
2/18dm: mmc: Set up the MMC device when controller is probed+0 -00 replies
3/18dm: video: Correct line clearing codedrivers/video/console_normal.c+2 -11 reply
4/18string: Use memcpy() within memmove() when we canlib/string.c+2 -91 reply
5/18arm: rpi: Drop the GPIO device addressesarch/arm/mach-bcm283x/include/mach/gpio.h+0 -51 reply
6/18arm: rpi: Drop CONFIG_CONS_INDEXinclude/configs/rpi.h+0 -11 reply
7/18dm: arm: rpi: Move to driver model for USBconfigs/rpi_2_defconfig configs/rpi_3_32b_defconfig configs/rpi_3_defconfig +2 more+4 -51 reply
8/18dm: arm: rpi: Use driver model for Ethernetconfigs/rpi_2_defconfig configs/rpi_3_32b_defconfig configs/rpi_3_defconfig +1 more+4 -01 reply
9/18arm: rpi: Add a file to handle messagesarch/arm/mach-bcm283x/Makefile arch/arm/mach-bcm283x/include/mach/msg.h arch/arm/mach-bcm283x/msg.c +1 more+61 -331 reply
10/18arm: rpi: Add a function to obtain the MMC clockarch/arm/mach-bcm283x/include/mach/msg.h arch/arm/mach-bcm283x/msg.c board/raspberrypi/rpi/rpi.c+39 -121 reply
11/18dm: mmc: rpi: Convert Raspberry Pi to driver model for MMCboard/raspberrypi/rpi/rpi.c configs/rpi_2_defconfig configs/rpi_3_32b_defconfig +3 more+69 -291 reply
12/18dm: arm: rpi: Drop CONFIG_OF_EMBEDconfigs/rpi_2_defconfig configs/rpi_3_32b_defconfig configs/rpi_3_defconfig +1 more+0 -41 reply
13/18video: arm: rpi: Move the video query out of the driverarch/arm/mach-bcm283x/include/mach/msg.h arch/arm/mach-bcm283x/msg.c drivers/video/bcm2835.c+38 -171 reply
14/18video: arm: rpi: Move the video settings out of the driverarch/arm/mach-bcm283x/include/mach/msg.h arch/arm/mach-bcm283x/msg.c drivers/video/bcm2835.c+88 -581 reply
15/18dm: video: Refactor lcd_simplefb to prepare for driver modelcommon/lcd_simplefb.c+22 -111 reply
16/18dm: video: Add driver-model support to lcd_simplefbcommon/lcd_simplefb.c+18 -01 reply
17/18dm: video: arm: rpi: Convert to use driver model for videoconfigs/rpi_2_defconfig configs/rpi_3_32b_defconfig configs/rpi_3_defconfig +3 more+34 -471 reply
18/18arm: rpi: Add a TODO to move all messages into the msg handlerboard/raspberrypi/rpi/rpi.c+1 -11 reply

Reviews trailers per patch

10 of 19 patches have a Reviewed-by or Acked-by.

PatchJaehoon ChungAnatolij GustschinTom Rini
1/18
2/18R-b
2/18R-b
3/18A-b
4/18R-b
5/18
6/18
7/18
8/18
9/18
10/18
11/18R-b
12/18
13/18A-b
14/18A-b
15/18A-b
16/18A-b
17/18A-b
18/18

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v6 thread

Cover letter [U-Boot] [PATCH v6 00/18] arm: rpi: Enable USB, Ethernet, MMC, Video driver model on Raspberry Pi

Raspberry Pi uses a DWC2 USB controller and a SMSC USB Ethernet adaptor. Driver model support for these is available.

This series does the following:
- Enable CONFIG_DM_ETH and CONFIG_DM_USB on Raspberry Pi
- Convert the MMC driver to driver model
- Convert the video driver to driver model
- Fixes a driver model video bug which accessed beyond the frame buffer
- Fixes start-up of MMC with driver model (e.g. at present it does not support env_fat)
- Clean up a few loose ends

With Ethernet active the device list looks something like this:

U-Boot> dm tree
Class Probed Name
----------------------------------------

 root        [ + ]    root_driver
 simple_bus  [ + ]    |-- soc
 gpio        [ + ]    |   |-- gpio at 7e200000
 serial      [ + ]    |   |-- serial at 7e215040
 mmc         [ + ]    |   |-- sdhci at 7e300000
 blk         [ + ]    |   |   `-- sdhci at 7e300000.blk
 video       [ + ]    |   |-- hdmi at 7e902000
 vidconsole0 [ + ]    |   |   `-- hdmi at 7e902000.vidconsole0
 usb         [ + ]    |   `-- usb at 7e980000
 usb_hub     [ + ]    |       `-- usb_hub
 usb_hub     [ + ]    |           `-- usb_hub
 eth         [ + ]    |               `-- smsc95xx_eth
 simple_bus  [   ]    `-- clocks

With version 4 a problem was discovered where tftpboot does not correctly read a file on rpi_2 and rpi_3. The cause is unknown but for now this series includes a work-around in the dwc2 driver. See here for details:

https://lists.denx.de/pipermail/u-boot/2017-April/285451.html

Changes in v6:
- Drop changes to dwc2.c now we have http://patchwork.ozlabs.org/patch/746917/
- Rebase to master

Changes in v5:
- Add new patch for smsc95xx to correct free_pkt() implementation
- Rebase to master

Changes in v4:
- Add patches to convert video and MMC to driver model also
- Rebase to master

Changes in v3:
- Drop applied patches from series
- Drop patch to introduce usbethaddr for driver model

Simon Glass (18):
net: smsc95xx: Correct free_pkt() implementation
dm: mmc: Set up the MMC device when controller is probed
dm: video: Correct line clearing code
string: Use memcpy() within memmove() when we can
arm: rpi: Drop the GPIO device addresses
arm: rpi: Drop CONFIG_CONS_INDEX
dm: arm: rpi: Move to driver model for USB
dm: arm: rpi: Use driver model for Ethernet
arm: rpi: Add a file to handle messages
arm: rpi: Add a function to obtain the MMC clock
dm: mmc: rpi: Convert Raspberry Pi to driver model for MMC
dm: arm: rpi: Drop CONFIG_OF_EMBED
video: arm: rpi: Move the video query out of the driver
video: arm: rpi: Move the video settings out of the driver
dm: video: Refactor lcd_simplefb to prepare for driver model
dm: video: Add driver-model support to lcd_simplefb
dm: video: arm: rpi: Convert to use driver model for video
arm: rpi: Add a TODO to move all messages into the msg handler

 arch/arm/mach-bcm283x/Makefile            |   2 +-
 arch/arm/mach-bcm283x/include/mach/gpio.h |   5 -
 arch/arm/mach-bcm283x/include/mach/msg.h  |  51 ++++++++++
 arch/arm/mach-bcm283x/msg.c               | 154 ++++++++++++++++++++++++++++++
 board/raspberrypi/rpi/rpi.c               |  56 +----------
 common/lcd_simplefb.c                     |  47 +++++++--
 configs/rpi_2_defconfig                   |   6 +-
 configs/rpi_3_32b_defconfig               |   6 +-
 configs/rpi_3_defconfig                   |   6 +-
 configs/rpi_defconfig                     |   6 +-
 drivers/mmc/bcm2835_sdhci.c               |  81 ++++++++++++----
 drivers/mmc/mmc-uclass.c                  |  12 +++
 drivers/usb/eth/smsc95xx.c                |   4 +-
 drivers/video/bcm2835.c                   | 140 +++++++--------------------
 drivers/video/console_normal.c            |   3 +-
 include/configs/rpi.h                     |  17 +---
 lib/string.c                              |  11 +--
 17 files changed, 384 insertions(+), 223 deletions(-)
 create mode 100644 arch/arm/mach-bcm283x/include/mach/msg.h
 create mode 100644 arch/arm/mach-bcm283x/msg.c
Signature · 1 line
2.12.2.715.g7642488e1d-goog