27 Apr, 2020

3 commits

  • Since the orginal way to call interrupts handle function of DM usb
    gadget driver is through dm_usb_gadget_handle_interrupts(), when we want
    to use two or more different gadget drivers at the same time, it will
    cause error of duplicate names.

    So here add a handle_interrupts function pointer instead of driectly
    call dm_usb_gadget_handle_interrupts(), then the error can be avoided.

    Signed-off-by: Sherry Sun
    (cherry picked from commit 2458ddd952a6a2d2304dfe7ea34e4192cd1d5ed4)

    Sherry Sun
     
  • For dual ethernet controllers, the HW design may connect ETH phys to
    one MDIO ports. So two different ethernet drivers have to share MDIO bus.
    Since two ethernet drivers are independent, we can't ensure their probe order.

    To resolve this problem, introduce an eth phy generic driver and uclass.

    After eth-uclass binds, we search the mdio node and binds the phy node with
    the eth-phy-generic driver.

    When one eth driver get its phy device, the parent of phy device will probe prior than
    phy device. So this ensure the eth driver ownes the MDIO bus will be probed
    before using its MDIO.

    Signed-off-by: Ye Li

    Ye Li
     
  • Add a new driver FLAG (DM_FLAG_IGNORE_DEFAULT_CLKS). If any driver
    is set with this flag, then when probing the device, we will skip
    setting the default clocks.

    This is useful when clock driver can't work with some device driver.

    Signed-off-by: Ye Li
    (cherry picked from commit 5dd4ff270dc387111f5feb85e4020adf2d60a32f)

    Ye Li
     

03 Mar, 2020

1 commit

  • In various cases a power domain must stay enabled after device
    removal when booting OS (i.e. serial debug console or display).
    Add a flag to selectively skip switching off a power domain.

    Fixes: 52edfed65de9 ("dm: core: device: switch off power domain after device removal")
    Signed-off-by: Anatolij Gustschin
    Acked-by: Neil Armstrong
    Tested-by: Guillaume La Roque
    Reviewed-by: Simon Glass

    Anatolij Gustschin
     

11 Feb, 2020

1 commit


07 Feb, 2020

2 commits

  • It is sometimes useful to find a device in a uclass using only its driver
    data. The driver data often indicates the 'subtype' of the device, e,g,
    via its compatible string.

    Add a function to handle this.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     
  • At present we have uclass_foreach_dev() which requires that uclass_get()
    be called beforehand to find the uclass. This is good if we suspect that
    that function might fail, but often we know that the uclass is available.

    Add a new helper which does this uclass_get() automatically, so that only
    the uclass ID is needed.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     

06 Feb, 2020

13 commits


09 Jan, 2020

1 commit


08 Jan, 2020

7 commits


15 Dec, 2019

4 commits

  • The Primary-to-Sideband bus (P2SB) is used to access various peripherals
    through memory-mapped I/O in a large chunk of PCI space. The space is
    segmented into different channels and peripherals are accessed by
    device-specific means within those channels. Devices should be added in
    the device tree as subnodes of the p2sb.

    This adds a uclass and enables it for sandbox.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     
  • Intel x86 SoCs have a power manager/controller which handles several
    power-related aspects of the platform. Add a uclass for this, with a few
    useful operations.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     
  • Early in boot it is necessary to decode the PCI device/function values for
    particular peripherals in the device tree or of-platdata. This is needed
    in TPL where CONFIG_PCI is not defined.

    To handle this, move pci_get_devfn() into a file that is built even when
    CONFIG_PCI is not defined.

    Also add a function for use by of-platdata, to convert a reg property to
    a pci_dev_t.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     
  • If the offset is -1 this function correctly sets up a null ofnode. But if
    the offset is any other negative number (e.g. -FDT_ERR_BADPATH) then it
    does the wrong thing.

    An offset of -1 in ofnode indicates that the ofnode is not valid. Any
    other negative value is not handled by ofnode_valid(). We could of course
    change that function, but it seems much better to always use the same
    value for an invalid node.

    Fix it by setting the offset to -1 if it is invalid for any reason.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     

14 Nov, 2019

1 commit


24 Oct, 2019

1 commit

  • Add Support for UFS Host Controller Interface (UFSHCI) for communicating
    with Universal Flash Storage (UFS) devices. The steps to initialize the
    host controller interface are the following:

    - Initiate the Host Controller Initialization process by writing to the
    Host controller enable register.
    - Configure the Host Controller base address registers by allocating a
    host memory space and related data structures.
    - Unipro link startup procedure
    - Check for connected device
    - Configure UFS host controller to process requests

    Also register this host controller as a SCSI host controller.

    Taken from Linux Kernel v5.2 (drivers/scsi/ufs/ufshcd.c) and ported to
    U-boot.

    Signed-off-by: Faiz Abbas

    Faiz Abbas
     

15 Oct, 2019

3 commits


14 Oct, 2019

1 commit

  • Display Serial Interface (DSI) host can usefully be modelled
    as their own uclass.
    DSI defines a serial bus and a communication protocol
    between the host and the device (panel, bridge).

    Signed-off-by: Yannick Fertré

    Yannick Fertré
     

11 Oct, 2019

1 commit


08 Oct, 2019

1 commit

  • At present PCI address transaction is not supported so drivers must
    manually read the correct BAR after reading the device tree info. The
    ns16550 has a suitable implementation, so move this code into the core
    DM support.

    Note that there is no live-tree equivalent at present.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Tested-by: Bin Meng
    [bmeng: correct the unclear comments in test.dts]
    Signed-off-by: Bin Meng

    Simon Glass