11 Oct, 2019

3 commits


30 Sep, 2019

1 commit


29 Sep, 2019

4 commits

  • On i.MX7 in a sake of reducing the disturbances caused by a neighboring
    cells in the FCB page in the NAND chip, a randomizer is enabled when
    reading the FCB page by ROM bootloader.

    Add API for setting BCH to specific layout (and restoring it back) used by
    ROM bootloader to be able to burn it in a proper way to NAND using
    nandbcb command.

    Signed-off-by: Igor Opaniuk
    Signed-off-by: Anti Sullin

    Signed-off-by: Alice Guo
    (cherry picked from commit eaba02830252ed044e319571a7f3ebed412ae93b)

    Igor Opaniuk
     
  • Since the USB HID limits the maximum bandwidth(3072) for interrupt
    endpoint transfers, when the bInterval set to 1, we can only support 3
    boards to run sdp at the same time. In order to support more boards,
    change the bInterval of interrupt endpoint to 3, which will not affect
    the transmission speed.

    Signed-off-by: Sherry Sun
    Reviewed-by: Ye Li
    (cherry picked from commit beb0283e6bac3d42cc87757e3c0e200e2ac3b68f)

    Sherry Sun
     
  • When use ep1out interrupt endpoint to receive data in sdp, the max
    packetsize of ep1out is set to 1024. But in cdns3 gadget driver, the
    max packetsize is limited to 512 bytes in high speed. So we can't
    implement data download through ep1out of cdns3 driver, here need
    change the max packesize of interrupt endpoints to 1024.

    Signed-off-by: Sherry Sun
    Reviewed-by: Ye Li
    (cherry picked from commit 17f321b4a32cfaac52339172dc354729e641451a)

    Sherry Sun
     
  • EP0 has been used to transfer file data in sdp before, but the max
    packetsize of ep0 is 64 bytes. So in order to improve the file transfer
    speed, here add the EP1_OUT interrupt endpoint which max packetsize is
    set to 1024 byte.

    After testing, it turns out that using ep1out is twice as fast as using
    ep0 while receiving data in sdp.

    Signed-off-by: Sherry Sun
    Reviewed-by: Ye Li
    (cherry picked from commit 22614e317b7fdf4a716f2e5bde876649414ffd6c)

    Sherry Sun
     

06 Sep, 2019

1 commit


05 Sep, 2019

4 commits


20 Aug, 2019

2 commits

  • Decrypt and verify the secure credential in keymaster TA, unlock
    operation can only be allowed after secure credential verify pass.

    Since the mppubk can only be generated on hab closed imx8q, so secure
    unlock feature can only supported when hab is closed.

    Test: secure unlock credential verify on hab closed imx8mm_evk.

    Change-Id: I1ab5e24df28d1e75ff853de3adf29f34da1d0a71
    Signed-off-by: Ji Luo

    Ji Luo
     
  • Add commands to support extract serial number from device.
    Commands:
    $ fastboot oem get-serial-number
    $ fastboot get_staged

    Test: serial number upload on imx8mm.

    Change-Id: I5c905ab797d4fd28d76c8403914f191eaf2ef687
    Signed-off-by: Ji Luo

    Ji Luo
     

14 Aug, 2019

2 commits


09 Aug, 2019

10 commits

  • Add PCIE relevant clocks to clk-imx8 driver, so PCIE IMX driver can
    set the clocks through DTB

    Signed-off-by: Ye Li

    Ye Li
     
  • Update PCIE IMX DM driver supports iMX8QM/QXP and
    iMX6QDL/QP/SX. Non-DM driver supports iMX6QDL/QP/SX.
    The changes in DM parses cfg/mem/io ranges, gpios, regulators and
    clocks (imx8 only) from DTS for RC mode, and set iATU mapping for
    each regions.

    The original iATU mapping sets full PCI region to CFG space. iATU
    translates MEM/IO TLP to CFG TLP when the address is falled into
    the region.
    The new mapping sets CFG/IO/MEM spaces to align with kernel like below
    ATU region 0 for MEM access
    ATU region 1 for CFG0 or CFG1 access by bus id
    ATU region 2 for IO access

    Signed-off-by: Ye Li

    Ye Li
     
  • Add DM support and support for probing the iMX PCI driver from DT.
    The legacy non-DM support is retained, however shall be removed once
    DM PCI is the only option remaining.

    Signed-off-by: Marek Vasut
    Cc: Bin Meng
    Cc: Fabio Estevam
    Cc: Stefano Babic
    Reviewed-by: Bin Meng
    (cherry picked from commit a11c0f44b77b745519e35d30fc5eecb6206107fb)

    Marek Vasut
     
  • Pass the driver private data around the driver as much as possible, instead
    of having it as a static global variable. This is done in preparation for
    the DM conversion, no functional change.

    Signed-off-by: Marek Vasut
    Cc: Bin Meng
    Cc: Fabio Estevam
    Cc: Stefano Babic
    Reviewed-by: Bin Meng
    (cherry picked from commit d2cc2e86f8e12393f2adf47c9a8694475e92e05a)

    Marek Vasut
     
  • The driver limits the config space base to 32bit, however it can be
    64bit on 64bit iMX hardware too. Remove that limitation. This patch
    has no impact on the iMX6, which is the only SoC currently supported
    by this driver.

    Signed-off-by: Marek Vasut
    Cc: Bin Meng
    Cc: Fabio Estevam
    Cc: Stefano Babic
    Reviewed-by: Bin Meng
    (cherry picked from commit 90f87fb5258c57bbb8497ac23454e659169483e4)

    Marek Vasut
     
  • Pull out hard-coded register base addresses into driver private
    structure in preparation for DM conversion. No functional change.

    Signed-off-by: Marek Vasut
    Cc: Bin Meng
    Cc: Fabio Estevam
    Cc: Stefano Babic
    Reviewed-by: Bin Meng
    (cherry picked from commit 33f794be36e846a522c7020e642a1e89c0769b17)

    Marek Vasut
     
  • Enable the configs of usb2 so that both usb2 and usb3 gadget
    drivers are now supported on imx8 plaform. And add
    CONFIG_USB_PORT_AUTO to support usb port autodetect function
    for SDP/fastboot.

    Signed-off-by: Sherry Sun

    Sherry Sun
     
  • For one usb controller driver, the transport endpoint address won't
    change after the driver initialize. So the value of bEndpointAddress
    have no need to be cleared.

    But when more than one usb controller drivers are used at the same time,
    different endpoints address is used by different controller driver
    usually, it will cause confusion of endpoint address. So the value of
    bEndpointAddress had better been cleared everytime before we refill
    endpoint address to it.

    Signed-off-by: Sherry Sun

    Sherry Sun
     
  • On imx8 platform, the usb2 and usb3 ports are both supported. Which
    means we can use usb2(ci_udc_otg) and usb3(cdns3_generic_peripheral)
    gadget driver to run sdp/fastboot/ums at the same time.

    For sdp and the fastboot that runs automatically when uboot starts,
    board_usb_gadget_port_auto() is added to autodetect usb port, this
    means that we don't have to specify which USB port should be used to
    download in code, now we can just connect either usb port then it
    will download automatically.

    Signed-off-by: Sherry Sun

    Sherry Sun
     
  • 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

    Sherry Sun
     

31 Jul, 2019

2 commits

  • Since the ci_udc driver has been converted to DM driver, the
    CONFIG_DM_USB_GADGET should also be selected when CONFIG_CI_UDC
    is enabled, then we can use DM ci_udc driver.

    Signed-off-by: Sherry Sun
    Reviewed-by: Ye Li

    Sherry Sun
     
  • Convert the ci_udc driver to driver model by using the uclass
    UCLASS_USB_GADGET_GENERIC. The clk and power of USB controller and USB
    PHY both are initialized by parsing the device tree nodes.

    If CONFIG_DM_USB_GADGET is defined, we use the ci_udc driver in DM way,
    if it does not defined, we can use ci_udc driver in its original Non-DM
    way.

    Move some USB PHY register definitions from ehci-mx6.c to
    asm/mach-imx/regs-usbphy.h in order to share with DM usb gadget driver.

    Signed-off-by: Sherry Sun
    Reviewed-by: Ye Li

    Sherry Sun
     

30 Jul, 2019

1 commit


26 Jul, 2019

5 commits


25 Jul, 2019

5 commits

  • The A/B slot selection is moved to spl, it may lead to hang
    if no bootable slots found. The only way to recover the board
    is re-flash images with uuu tool, which is quite inconvenient
    for some customers who can't enter serial download mode.

    This patch will set "spl recovery mode" which will give us a
    chance to re-flash images with fastboot commands.

    Test: Enter spl recovery mode and flash images when no bootable
    slots found.

    Change-Id: I31278f5212bde7609fe2f49e77b3849e92c0c516
    Signed-off-by: Ji Luo

    Ji Luo
     
  • when conduct fastboot lock/unlock operations, erase the userdata first
    and then set lock/unlock status to improve security level.

    Change-Id: I74c571c35b88afd6fdd4c287463f7209da8c15ff
    Signed-off-by: faqiang.zhu

    faqiang.zhu
     
  • It can be dangerous to export some hwcrypto commands to Linux,
    add commands to limit some commands within bootloader.

    Test: hwcrypto commands can't be used after locking boot state.

    Change-Id: Ib0a96a87f661778c133178840d8dccf49f151c22
    Signed-off-by: Ji Luo

    Ji Luo
     
  • In host end, need encrypt the attestation keys and certs
    by manufacture protection public key though AES-128-ECB.
    Then use below 4 set of commands to provision encrypted
    RSA attestation and EC attestation:
    * $fastboot stage atte_rsa_key.bin
    * $fastboot oem set-rsa-atte-key-enc
    * $fastboot stage atte_rsa_cert.bin
    * $fastboot oem append-rsa-atte-cert-enc
    * $fastboot stage atte_ec_key.bin
    * $fastboot oem set-ec-atte-key-enc
    * $fastboot stage atte_ec_cert.bin
    * $fastboot oem append-ec-atte-cert-enc

    Change-Id: I8a7c64004a17f7dde89f28c3123a2e2b1a6d3346
    Signed-off-by: Haoran.Wang

    Haoran.Wang
     
  • Add new keymaster commands to get Manufacure Production key (mppubk).
    Since the mppubk can only be generated in OEM CLOSED imx8q board, so
    we can only use this command when the board is HAB/AHAB closed.

    Commands to extract the mppubk:
    * $fastboot oem get-mppubk
    * $fastboot get_staged mppubk.bin

    Test: Generate and dump the mppubk.bin

    Change-Id: Idc59e78ca6345497e744162664b8293f50d1eda4
    Signed-off-by: Ji Luo

    Ji Luo