1. 10 4月, 2019 20 次提交
  2. 09 4月, 2019 20 次提交
    • S
      net: macb: Add small delay after link establishment · 7bf9bca7
      Stefan Roese 提交于
      I've noticed that the first ethernet packet after PHY link establishment
      is not tranferred correctly most of the time on my AT91SAM9G25 board.
      Here I usually see a timeout of a few seconds, which is quite
      annoying.
      
      Adding a small delay (10ms in this case) after the link establishment
      helps to solve this problem. With this patch applied, this timeout
      on the first packet is not seen any more.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Wenyou Yang <wenyou.yang@atmel.com>
      Cc: Eugen Hristev <eugen.hristev@microchip.com>
      Cc: Joe Hershberger <joe.hershberger@ni.com>
      Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
      7bf9bca7
    • C
      pinctrl: at91: add slewrate support for SAM9X60 · 068d4c0a
      Claudiu Beznea 提交于
      Add slew rate support for SAM9X60 pin controller.
      Signed-off-by: NClaudiu Beznea <claudiu.beznea@microchip.com>
      068d4c0a
    • C
      pinctrl: at91: add compatibles for SAM9X60 pin controller · be6e2405
      Claudiu Beznea 提交于
      Add compatibles for SAM9X60 pin controller.
      Signed-off-by: NClaudiu Beznea <claudiu.beznea@microchip.com>
      be6e2405
    • C
      pinctrl: at91: add drive strength support for SAM9X60 · 1a6a8288
      Claudiu Beznea 提交于
      Add drive strength support for SAM9X60 pin controller.
      Signed-off-by: NClaudiu Beznea <claudiu.beznea@microchip.com>
      1a6a8288
    • C
      pinctrl: at91: add option to use drive strength bits · 04d4ec9c
      Claudiu Beznea 提交于
      SAM9X60 uses high and low drive strengths. To implement this, in
      at91_pinctrl_mux_ops::set_drivestrength we need bit numbers of
      drive strengths (1 for low, 2 for high), thus change the code to
      allow the usage of drive strength bit numbers.
      Signed-off-by: NClaudiu Beznea <claudiu.beznea@microchip.com>
      04d4ec9c
    • S
      arm: at91: Add gardena-gateway-at91sam support · a71e2f93
      Stefan Roese 提交于
      The GARDENA smart Gateway boards are equipped with an Atmel / Microchip
      AT91SAM9G25 SoC and with 128 MiB of RAM and 256 MiB of NAND storage.
      This patch adds support for this board including SPL support. Therefore
      the AT91Boostrap is not needed on this platform any more.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Andreas Bießmann <andreas@biessmann.org>
      Cc: Eugen Hristev <eugen.hristev@microchip.com>
      Reviewed-by: NHeiko Schocher <hs@denx.de>
      a71e2f93
    • S
      arm: at91: at91sam9x5.dtsi: Add watchdog handle · d4c8873f
      Stefan Roese 提交于
      This makes it possible to reference the watchdog DT node via "&watchdog"
      from board dts files.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Andreas Bießmann <andreas@biessmann.org>
      Cc: Eugen Hristev <eugen.hristev@microchip.com>
      Reviewed-by: NHeiko Schocher <hs@denx.de>
      d4c8873f
    • S
      arm: at91: siemens: Add support to generate combined SPL+U-Boot image · fc89afba
      Stefan Roese 提交于
      This patch adds the necessary defines to the Siemens AT91SAM based
      boards (smartweb, corvus and taurus) to generate the combined binary
      image with SPL and main U-Boot image combined (u-boot-with-spl.bin).
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Andreas Bießmann <andreas@biessmann.org>
      Cc: Eugen Hristev <eugen.hristev@microchip.com>
      Reviewed-by: NHeiko Schocher <hs@denx.de>
      Tested on the taurus board:
      Tested-by: NHeiko Schocher <hs@denx.de>
      fc89afba
    • S
      Makefile: Add Kconfig option CONFIG_SPL_IMAGE to select the SPL binary · 9ea6f718
      Stefan Roese 提交于
      This patch adds the CONFIG_SPL_IMAGE option to select the SPL image that
      shall be used to generate the combined SPL + U-Boot image. The default
      value is the current value "spl/u-boot-spl.bin".
      
      This patch also sets CONFIG_SPL_IMAGE to "spl/boot.bin" for AT91 targets
      which use SPL NAND support (boot from NAND). For these build targets the
      combined image "u-boot-with-spl.bin" is now automatically generated and
      can be programmed into NAND as one single image (vs. SPL image and U-Boot
      as 2 separate images).
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Andreas Bießmann <andreas@biessmann.org>
      Cc: Eugen Hristev <eugen.hristev@microchip.com>
      9ea6f718
    • S
      Makefile.spl: Move generated AT91SAM NAND image boot.bin to spl directory · 581e711a
      Stefan Roese 提交于
      This patch moves the AT91SAM NAND booting SPL image "boot.bin" which
      includes the ECC values from the root directory into the spl directory,
      where all SPL related images are located.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Andreas Bießmann <andreas@biessmann.org>
      Cc: Eugen Hristev <eugen.hristev@microchip.com>
      Reviewed-by: NHeiko Schocher <hs@denx.de>
      Tested on the taurus board:
      Tested-by: NHeiko Schocher <hs@denx.de>
      581e711a
    • S
      arm: at91: arm926ejs/u-boot-spl.lds: Add _image_binary_end to SPL lds · da8a7712
      Stefan Roese 提交于
      This patch adds _image_binary_end to the SPL linker script. This will be
      used be the upcoming GARDENA AT91SAM based platform, which uses DT in
      SPL and configures CONFIGURE_SPL_SEPARATE_BSS.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Andreas Bießmann <andreas@biessmann.org>
      Cc: Eugen Hristev <eugen.hristev@microchip.com>
      Reviewed-by: NHeiko Schocher <hs@denx.de>
      da8a7712
    • S
      arm: at91: Enable watchdog support · 256c2ff0
      Stefan Roese 提交于
      This patch enables and starts the watchdog on the AT91 platform if
      configured. The WD timeout value is read in the AT91 WD device driver
      from the DT, using the "timeout-sec" DT property. If not provided in
      the DT, the default value of 2 seconds is used.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Andreas Bießmann <andreas@biessmann.org>
      Cc: Eugen Hristev <eugen.hristev@microchip.com>
      256c2ff0
    • S
      arm: at91: Remove CONFIG_AT91_HW_WDT_TIMEOUT · 05d4b8e4
      Stefan Roese 提交于
      This patch removes the CONFIG_AT91_HW_WDT_TIMEOUT as its not needed any
      more. The WD timeout value can be provided via the "timeout-sec" DT
      property. If not provided this way, the default value of 2 seconds will
      be used.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Andreas Bießmann <andreas@biessmann.org>
      Cc: Eugen Hristev <eugen.hristev@microchip.com>
      05d4b8e4
    • S
      watchdog: at91sam9_wdt: Fix WDT setup in at91_wdt_start() · 6c04bd38
      Stefan Roese 提交于
      This patch fixes the timer register setup in at91_wdt_start() to
      correctly configure the register again. The input timeout value is
      now in milli-seconds instead of seconds with the new watchdog API.
      Make sure to take this into account and only use a max timeout
      value of 16 seconds as appropriate for this SoC.
      
      Also the check against a lower timeout value than 0 is removed. This
      check makes no sense, as the timeout value is unsigned.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Reported-by: NHeiko Schocher <hs@denx.de>
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Andreas Bießmann <andreas@biessmann.org>
      Cc: Eugen Hristev <eugen.hristev@microchip.com>
      Reviewed-by: NHeiko Schocher <hs@denx.de>
      Tested on the taurus board:
      Tested-by: NHeiko Schocher <hs@denx.de>
      6c04bd38
    • S
      watchdog: Handle SPL build with watchdog disabled · 7fbd42f5
      Stefan Roese 提交于
      This patch adds some checks, so that the watchdog can be enabled in main
      U-Boot proper but can be disabled in SPL.
      
      This will be used by some AT91SAM based boards, which might enable the
      watchdog in the main U-Boot proper and not in SPL. It will be enabled in
      SPL by default there, so no need to configure it there. This approach
      saves some space in SPL.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Andreas Bießmann <andreas@biessmann.org>
      Cc: Eugen Hristev <eugen.hristev@microchip.com>
      Reviewed-by: NHeiko Schocher <hs@denx.de>
      Tested on the taurus board:
      Tested-by: NHeiko Schocher <hs@denx.de>
      7fbd42f5
    • S
      serial: atmel_usart: Use fixed clock value in SPL version with DM_SERIAL · e567dfb2
      Stefan Roese 提交于
      This patch adds an alterative SPL version of atmel_serial_enable_clk().
      This enables the usage of this driver without full clock support (in
      drivers and DT nodes). This saves some space in the SPL image.
      
      Please note that this fixed clock support is only added to the SPL code
      in the DM_SERIAL part of this file. All boards not using SPL & DM_SERIAL
      should not be affected.
      
      This patch also introduces CONFIG_SPL_UART_CLOCK for the fixed UART
      input clock. It defaults to 132096000 for ARCH_AT91 but can be set to
      a different value if needed.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Andreas Bießmann <andreas@biessmann.org>
      Cc: Eugen Hristev <eugen.hristev@microchip.com>
      e567dfb2
    • S
      arm: at91: spl_at91.c: Call spl_early_init() if OF_CONTROL is enabled · ce4d04af
      Stefan Roese 提交于
      This patch adds a call to spl_early_init() to board_init_f() which is
      needed when CONFIG_SPL_OF_CONTROL is configured. This is necessary for
      the early SPL setup including the DTB setup for later usage.
      
      Please note that this call might also be needed for non SPL_OF_CONTROL
      board, like the smartweb target. But smartweb fails to build with this
      call because its binary grows too big. So I disabled it for these kind
      of targets for now.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Andreas Bießmann <andreas@biessmann.org>
      Cc: Eugen Hristev <eugen.hristev@microchip.com>
      Reviewed-by: NHeiko Schocher <hs@denx.de>
      Tested on the taurus board:
      Tested-by: NHeiko Schocher <hs@denx.de>
      ce4d04af
    • S
      arm: at91: Makefile: Compile lowlevel_init only when really necessary · e6a27693
      Stefan Roese 提交于
      Make sure that lowlevel_init is not compiled when
      CONFIG_SKIP_LOWLEVEL_INIT_ONLY is configured.
      Signed-off-by: NStefan Roese <sr@denx.de>
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Andreas Bießmann <andreas@biessmann.org>
      Cc: Eugen Hristev <eugen.hristev@microchip.com>
      Reviewed-by: NHeiko Schocher <hs@denx.de>
      Tested on the taurus board:
      Tested-by: NHeiko Schocher <hs@denx.de>
      e6a27693
    • I
      board: pm9g45: Migrate to CONFIG_DM · d9bd4290
      Ilko Iliev 提交于
      Migrate the following options to CONFIG_DM:
        CONFIG_DM_GPIO
        CONFIG_DM_MMC
        CONFIG_DM_ETH
        CONFIG_DM_SERIAL
        CONFIG_DM_USB
      Signed-off-by: NIlko Iliev <iliev@ronetix.at>
      d9bd4290
    • A
      ARM: at91: sama5d2: Wrap cpu detection to fix macb driver · 7dee1848
      Alexander Dahl 提交于
      When introducing the SAMA5D27 SoCs, the SAMA5D2 series got an additional
      chip id. The check if the cpu is sama5d2 was changed from a preprocessor
      definition (inlining a call to 'get_chip_id()') to a C function,
      probably to not call get_chip_id twice?
      
      That however broke a check in the macb ethernet driver. That driver is
      more generic and also used for other platforms. I suppose this solution
      was implemented to use it in 'gem_is_gigabit_capable()', without having
      to stricly depend on the at91 platform:
      
      	#ifndef cpu_is_sama5d2
      	#define cpu_is_sama5d2() 0
      	#endif
      
      That only works as long as cpu_is_sama5d2 is a preprocessor definition.
      (The same is still true for sama5d4 by the way.) So this is a straight
      forward fix for the workaround.
      
      The not working check on the SAMA5D2 CPU lead to an issue on a custom
      board with a LAN8720A ethernet phy connected to the SoC:
      
      	=> dhcp
      	ethernet@f8008000: PHY present at 1
      	ethernet@f8008000: Starting autonegotiation...
      	ethernet@f8008000: Autonegotiation complete
      	ethernet@f8008000: link up, 1000Mbps full-duplex (lpa: 0xffff)
      	BOOTP broadcast 1
      	BOOTP broadcast 2
      	BOOTP broadcast 3
      	BOOTP broadcast 4
      	BOOTP broadcast 5
      	BOOTP broadcast 6
      	BOOTP broadcast 7
      	BOOTP broadcast 8
      	BOOTP broadcast 9
      	BOOTP broadcast 10
      	BOOTP broadcast 11
      	BOOTP broadcast 12
      	BOOTP broadcast 13
      	BOOTP broadcast 14
      	BOOTP broadcast 15
      	BOOTP broadcast 16
      	BOOTP broadcast 17
      
      	Retry time exceeded; starting again
      
      Notice the wrong reported link speed, although both SoC and phy only
      support 100 MBit/s!
      
      The real issue on reliably detecting the features of that cadence
      ethernet mac IP block, is probably more complicated, though.
      
      Fixes: 245cbc58 ("ARM: at91: Get the Chip ID of SAMA5D2 SiP")
      Signed-off-by: NAlexander Dahl <ada@thorsis.com>
      7dee1848