All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v1 0/2] sunxi: Gigabit PHY support for SUN8I_EMAC
@ 2017-02-17 17:47 Philipp Tomsich
  2017-02-17 17:47 ` [U-Boot] [PATCH v1 1/2] sun8i: define CONFIG_PHY_GIGE for EMAC Philipp Tomsich
  2017-02-17 17:47 ` [U-Boot] [PATCH v1 2/2] sun8i: enable support for the Micrel KSZ9031 with SUN8I_EMAC Philipp Tomsich
  0 siblings, 2 replies; 13+ messages in thread
From: Philipp Tomsich @ 2017-02-17 17:47 UTC (permalink / raw)
  To: u-boot

The sun8i_emac is a triple-speed Ethernet controller.
This changeset adds support for negotiating links at gigabit speeds:
 * enables CONFIG_PHY_GIGE
 * enables support for the Micrel KSZ9031 GbE PHY

Separated out into two changes, as CONFIG_PHY_GIGE is needed with any
GbE PHY for gigabit-operation. Bundled into a single changeset, as we
test this with the KSZ9031 on our boards.




Klaus Goger (1):
  sun8i: define CONFIG_PHY_GIGE for EMAC

Philipp Tomsich (1):
  sun8i: enable support for the Micrel KSZ9031 with SUN8I_EMAC

 include/configs/sunxi-common.h | 6 ++++++
 1 file changed, 6 insertions(+)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH v1 1/2] sun8i: define CONFIG_PHY_GIGE for EMAC
  2017-02-17 17:47 [U-Boot] [PATCH v1 0/2] sunxi: Gigabit PHY support for SUN8I_EMAC Philipp Tomsich
@ 2017-02-17 17:47 ` Philipp Tomsich
  2017-02-21  3:55   ` Chen-Yu Tsai
  2017-02-21 19:55   ` Maxime Ripard
  2017-02-17 17:47 ` [U-Boot] [PATCH v1 2/2] sun8i: enable support for the Micrel KSZ9031 with SUN8I_EMAC Philipp Tomsich
  1 sibling, 2 replies; 13+ messages in thread
From: Philipp Tomsich @ 2017-02-17 17:47 UTC (permalink / raw)
  To: u-boot

From: Klaus Goger <klaus.goger@theobroma-systems.com>

CONFIG_PHY_GIGE needs to be defined for miiphy_speed to report correct speed.

Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
---
 include/configs/sunxi-common.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index e8e26a5..e20ea6a 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -285,323 +285,327 @@ extern int soft_i2c_gpio_sda;
 extern int soft_i2c_gpio_scl;
 #endif
 #define CONFIG_VIDEO_LCD_I2C_BUS	0 /* The lcd panel soft i2c is bus 0 */
 #define CONFIG_SYS_SPD_BUS_NUM		1 /* And the axp209 i2c bus is bus 1 */
 #else
 #define CONFIG_SYS_SPD_BUS_NUM		0 /* The axp209 i2c bus is bus 0 */
 #define CONFIG_VIDEO_LCD_I2C_BUS	-1 /* NA, but necessary to compile */
 #endif
 
 /* PMU */
 #if defined CONFIG_AXP152_POWER || defined CONFIG_AXP209_POWER || \
     defined CONFIG_AXP221_POWER || defined CONFIG_AXP818_POWER || \
     defined CONFIG_SY8106A_POWER
 #endif
 
 #ifndef CONFIG_CONS_INDEX
 #define CONFIG_CONS_INDEX              1       /* UART0 */
 #endif
 
 #ifdef CONFIG_REQUIRE_SERIAL_CONSOLE
 #if CONFIG_CONS_INDEX == 1
 #ifdef CONFIG_MACH_SUN9I
 #define OF_STDOUT_PATH		"/soc/serial at 07000000:115200"
 #else
 #define OF_STDOUT_PATH		"/soc at 01c00000/serial at 01c28000:115200"
 #endif
 #elif CONFIG_CONS_INDEX == 2 && defined(CONFIG_MACH_SUN5I)
 #define OF_STDOUT_PATH		"/soc at 01c00000/serial at 01c28400:115200"
 #elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN6I)
 #define OF_STDOUT_PATH          "/soc at 01c00000/serial at 01c28800:115200"
 #elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN8I)
 #define OF_STDOUT_PATH		"/soc at 01c00000/serial at 01c28800:115200"
 #elif CONFIG_CONS_INDEX == 5 && defined(CONFIG_MACH_SUN8I)
 #define OF_STDOUT_PATH		"/soc at 01c00000/serial at 01f02800:115200"
 #else
 #error Unsupported console port nr. Please fix stdout-path in sunxi-common.h.
 #endif
 #endif /* ifdef CONFIG_REQUIRE_SERIAL_CONSOLE */
 
 /* GPIO */
 #define CONFIG_SUNXI_GPIO
 
 #ifdef CONFIG_VIDEO
 /*
  * The amount of RAM to keep free at the top of RAM when relocating u-boot,
  * to use as framebuffer. This must be a multiple of 4096.
  */
 #define CONFIG_SUNXI_MAX_FB_SIZE (16 << 20)
 
 /* Do we want to initialize a simple FB? */
 #define CONFIG_VIDEO_DT_SIMPLEFB
 
 /* Fallback to old sunxi_video if the driver model video driver is disabled */
 #ifndef CONFIG_VIDEO_SUNXI_DM
 #define CONFIG_VIDEO_SUNXI
 #endif
 
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 
 #define CONFIG_CMD_BMP
 #define CONFIG_SPLASH_SCREEN_ALIGN
 
 #define CONFIG_VIDEO_STD_TIMINGS
 #define CONFIG_I2C_EDID
 #define VIDEO_LINE_LEN (pGD->plnSizeX)
 
 /* allow both serial and cfb console. */
 /* stop x86 thinking in cfbconsole from trying to init a pc keyboard */
 
 #endif /* CONFIG_VIDEO */
 
 /* Ethernet support */
 #ifdef CONFIG_SUNXI_EMAC
 #define CONFIG_PHY_ADDR		1
 #define CONFIG_MII			/* MII PHY management		*/
 #define CONFIG_PHYLIB
 #endif
 
 #ifdef CONFIG_SUNXI_GMAC
 #define CONFIG_PHY_GIGE			/* GMAC can use gigabit PHY	*/
 /* Cherry-pick from A80: #define CONFIG_PHY_ADDR		1 */
 #define CONFIG_MII			/* MII PHY management		*/
 #define CONFIG_PHY_REALTEK
 #define CONFIG_PHY_MICREL
 #define CONFIG_PHY_MICREL_KSZ9031
 #endif
 
+#ifdef CONFIG_SUN8I_EMAC
+#define CONFIG_PHY_GIGE			/* GMAC can use gigabit PHY	*/
+#endif
+
 #ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_USB_OHCI_NEW
 #define CONFIG_USB_OHCI_SUNXI
 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 1
 #endif
 
 #ifdef CONFIG_USB_MUSB_SUNXI
 #define CONFIG_USB_MUSB_PIO_ONLY
 #endif
 
 #ifdef CONFIG_USB_MUSB_GADGET
 #define CONFIG_USB_FUNCTION_MASS_STORAGE
 #endif
 
 #ifdef CONFIG_USB_FUNCTION_FASTBOOT
 #define CONFIG_FASTBOOT_BUF_SIZE	0x8000000
 #define CONFIG_SYS_BOOTM_LEN            0x1000000
 
 #define CONFIG_SUNXI_FASTBOOT_GPIO      "PM7"
 
 #ifdef CONFIG_SUNXI_FASTBOOT_GPIO
 #  define CONFIG_BOARD_LATE_INIT
 #endif
 
 #ifdef CONFIG_MMC
 #define CONFIG_FASTBOOT_FLASH_MMC_DEV	 1
 #define CONFIG_EFI_PARTITION_ENTRIES_OFF 1024000
 #define CONFIG_RANDOM_UUID
 #endif
 #endif
 
 #ifdef CONFIG_USB_FUNCTION_MASS_STORAGE
 #endif
 
 #ifdef CONFIG_USB_KEYBOARD
 #define CONFIG_PREBOOT
 #define CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE
 #endif
 
 #if !defined CONFIG_ENV_IS_IN_MMC && \
     !defined CONFIG_ENV_IS_IN_NAND && \
     !defined CONFIG_ENV_IS_IN_FAT && \
     !defined CONFIG_ENV_IS_IN_SPI_FLASH
 #define CONFIG_ENV_IS_NOWHERE
 #endif
 
 #define CONFIG_MISC_INIT_R
 
 #ifndef CONFIG_SPL_BUILD
 #include <config_distro_defaults.h>
 
 #ifdef CONFIG_ARM64
 /*
  * Boards seem to come with at least 512MB of DRAM.
  * The kernel should go at 512K, which is the default text offset (that will
  * be adjusted at runtime if needed).
  * There is no compression for arm64 kernels (yet), so leave some space
  * for really big kernels, say 256MB for now.
  * Scripts, PXE and DTBs should go afterwards, leaving the rest for the initrd.
  * Align the initrd to a 2MB page.
  */
 #define KERNEL_ADDR_R	__stringify(SDRAM_OFFSET(0080000))
 #define FDT_ADDR_R	__stringify(SDRAM_OFFSET(FA00000))
 #define SCRIPT_ADDR_R	__stringify(SDRAM_OFFSET(FC00000))
 #define PXEFILE_ADDR_R	__stringify(SDRAM_OFFSET(FD00000))
 #define RAMDISK_ADDR_R	__stringify(SDRAM_OFFSET(FE00000))
 
 #else
 /*
  * 160M RAM (256M minimum minus 64MB heap + 32MB for u-boot, stack, fb, etc.
  * 32M uncompressed kernel, 16M compressed kernel, 1M fdt,
  * 1M script, 1M pxe and the ramdisk at the end.
  */
 
 #define KERNEL_ADDR_R  __stringify(SDRAM_OFFSET(2000000))
 #define FDT_ADDR_R     __stringify(SDRAM_OFFSET(3000000))
 #define SCRIPT_ADDR_R  __stringify(SDRAM_OFFSET(3100000))
 #define PXEFILE_ADDR_R __stringify(SDRAM_OFFSET(3200000))
 #define RAMDISK_ADDR_R __stringify(SDRAM_OFFSET(3300000))
 #endif
 
 #define MEM_LAYOUT_ENV_SETTINGS \
 	"bootm_size=0xa000000\0" \
 	"kernel_addr_r=" KERNEL_ADDR_R "\0" \
 	"fdt_addr_r=" FDT_ADDR_R "\0" \
 	"scriptaddr=" SCRIPT_ADDR_R "\0" \
 	"pxefile_addr_r=" PXEFILE_ADDR_R "\0" \
 	"ramdisk_addr_r=" RAMDISK_ADDR_R "\0"
 
 #define DFU_ALT_INFO_RAM \
 	"dfu_alt_info_ram=" \
 	"kernel ram " KERNEL_ADDR_R " 0x1000000;" \
 	"fdt ram " FDT_ADDR_R " 0x100000;" \
 	"ramdisk ram " RAMDISK_ADDR_R " 0x4000000\0"
 
 #ifdef CONFIG_MMC
 #define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0)
 #if CONFIG_MMC_SUNXI_SLOT_EXTRA != -1
 #define BOOT_TARGET_DEVICES_MMC_EXTRA(func) func(MMC, mmc, 1)
 #else
 #define BOOT_TARGET_DEVICES_MMC_EXTRA(func)
 #endif
 #else
 #define BOOT_TARGET_DEVICES_MMC(func)
 #define BOOT_TARGET_DEVICES_MMC_EXTRA(func)
 #endif
 
 #ifdef CONFIG_AHCI
 #define BOOT_TARGET_DEVICES_SCSI(func) func(SCSI, scsi, 0)
 #else
 #define BOOT_TARGET_DEVICES_SCSI(func)
 #endif
 
 #ifdef CONFIG_USB_STORAGE
 #define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0)
 #else
 #define BOOT_TARGET_DEVICES_USB(func)
 #endif
 
 #ifdef CONFIG_USB_FUNCTION_FASTBOOT
 #define BOOT_TARGET_DEVICES_FASTBOOT(func) func(FASTBOOT, fastboot, 0)
 #else
 #define BOOT_TARGET_DEVICES_FASTBOOT(func)
 #endif
 
 /* FEL boot support, auto-execute boot.scr if a script address was provided */
 #define BOOTENV_DEV_FEL(devtypeu, devtypel, instance) \
 	"bootcmd_fel=" \
 		"if test -n ${fel_booted} && test -n ${fel_scriptaddr}; then " \
 			"echo '(FEL boot)'; " \
 			"source ${fel_scriptaddr}; " \
 		"fi\0"
 #define BOOTENV_DEV_NAME_FEL(devtypeu, devtypel, instance) \
 	"fel "
 
 #define BOOTENV_DEV_FASTBOOT(devtypeu, devtypel, instance) \
         "bootcmd_fastboot=" \
 	       "fastboot musb\0"
 
 #define BOOTENV_DEV_NAME_FASTBOOT(devtypeu, devtypel, instance) \
         "fastboot "
 
 #define BOOT_TARGET_DEVICES(func) \
 	func(FEL, fel, na) \
 	BOOT_TARGET_DEVICES_MMC_EXTRA(func) \
 	BOOT_TARGET_DEVICES_MMC(func) \
 	BOOT_TARGET_DEVICES_SCSI(func) \
 	BOOT_TARGET_DEVICES_USB(func) \
 	BOOT_TARGET_DEVICES_FASTBOOT(func) \
 	func(PXE, pxe, na) \
 	func(DHCP, dhcp, na)
 
 #ifdef CONFIG_OLD_SUNXI_KERNEL_COMPAT
 #define BOOTCMD_SUNXI_COMPAT \
 	"bootcmd_sunxi_compat=" \
 		"setenv root /dev/mmcblk0p3 rootwait; " \
 		"if ext2load mmc 0 0x44000000 uEnv.txt; then " \
 			"echo Loaded environment from uEnv.txt; " \
 			"env import -t 0x44000000 ${filesize}; " \
 		"fi; " \
 		"setenv bootargs console=${console} root=${root} ${extraargs}; " \
 		"ext2load mmc 0 0x43000000 script.bin && " \
 		"ext2load mmc 0 0x48000000 uImage && " \
 		"bootm 0x48000000\0"
 #else
 #define BOOTCMD_SUNXI_COMPAT
 #endif
 
 #include <config_distro_bootcmd.h>
 
 #ifdef CONFIG_USB_KEYBOARD
 #define CONSOLE_STDIN_SETTINGS \
 	"preboot=usb start\0" \
 	"stdin=serial,usbkbd\0"
 #else
 #define CONSOLE_STDIN_SETTINGS \
 	"stdin=serial\0"
 #endif
 
 #ifdef CONFIG_VIDEO
 #define CONSOLE_STDOUT_SETTINGS \
 	"stdout=serial,vga\0" \
 	"stderr=serial,vga\0"
 #else
 #define CONSOLE_STDOUT_SETTINGS \
 	"stdout=serial\0" \
 	"stderr=serial\0"
 #endif
 
 #define CONSOLE_ENV_SETTINGS \
 	CONSOLE_STDIN_SETTINGS \
 	CONSOLE_STDOUT_SETTINGS
 
 /* The space below the paritions-entries is reserved by the EFI
  * partition table (i.e. 'first_usable_lba' points to the first
  * LBA beyond the table.  We thus don't need to have any 'magic'
  * partitions for the bootloader or any other reserved areas.
  */
 #define CONFIG_EFI_PARTITION_ENTRIES_OFF 1024000
 #define PARTS_DEFAULT \
   "uuid_disk=${uuid_gpt_disk};" \
   "name=resource,size=16M;" \
   "name=boot,size=16M;" \
   "name=system,size=500M,uuid=69dad710-2ce4-4e3c-b16c-21a1d49abed3;" \
   "name=cache,size=256M;" \
   "name=databk,size=128M;" \
   "name=data,size=-,uuid=933ac7e1-2eb4-4f13-b844-0e14e2aef915;"
 
 #if (CONFIG_CONS_INDEX == 1)
 #define CONSOLE_DEFAULT "console=ttyS0,115200\0"
 #elif (CONFIG_CONS_INDEX == 3)
 #define CONSOLE_DEFAULT "console=ttyS2,115200\0"
 #else
 #error "CONFIG_CONS_INDEX to CONFIG_DEFAULT_CONSOLE_ENV missing."
 #endif
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	CONSOLE_ENV_SETTINGS \
 	MEM_LAYOUT_ENV_SETTINGS \
 	DFU_ALT_INFO_RAM \
 	"partitions=" PARTS_DEFAULT "\0" \
 	"partitions_linux=" \
         "uuid_disk=${uuid_gpt_disk};" \
 	"name=rootfs,size=-,uuid=69dad710-2ce4-4e3c-b16c-21a1d49abed3\0" \
 	"fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
 	CONSOLE_DEFAULT \
 	BOOTCMD_SUNXI_COMPAT \
 	BOOTENV
 
 #else /* ifndef CONFIG_SPL_BUILD */
 #define CONFIG_EXTRA_ENV_SETTINGS
 #endif
 
 #endif /* _SUNXI_COMMON_CONFIG_H */
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH v1 2/2] sun8i: enable support for the Micrel KSZ9031 with SUN8I_EMAC
  2017-02-17 17:47 [U-Boot] [PATCH v1 0/2] sunxi: Gigabit PHY support for SUN8I_EMAC Philipp Tomsich
  2017-02-17 17:47 ` [U-Boot] [PATCH v1 1/2] sun8i: define CONFIG_PHY_GIGE for EMAC Philipp Tomsich
@ 2017-02-17 17:47 ` Philipp Tomsich
  2017-02-21 19:56   ` Maxime Ripard
  1 sibling, 1 reply; 13+ messages in thread
From: Philipp Tomsich @ 2017-02-17 17:47 UTC (permalink / raw)
  To: u-boot

Enable support for the MICREL KSZ9031 GbE PHY in sunxi-common.h	when
using the SUN8I_EMAC driver (e.g. on the A64).

X-AffectedPlatforms: A64-uQ7
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
---
 include/configs/sunxi-common.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index e20ea6a..374ae09 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -285,327 +285,329 @@ extern int soft_i2c_gpio_sda;
 extern int soft_i2c_gpio_scl;
 #endif
 #define CONFIG_VIDEO_LCD_I2C_BUS	0 /* The lcd panel soft i2c is bus 0 */
 #define CONFIG_SYS_SPD_BUS_NUM		1 /* And the axp209 i2c bus is bus 1 */
 #else
 #define CONFIG_SYS_SPD_BUS_NUM		0 /* The axp209 i2c bus is bus 0 */
 #define CONFIG_VIDEO_LCD_I2C_BUS	-1 /* NA, but necessary to compile */
 #endif
 
 /* PMU */
 #if defined CONFIG_AXP152_POWER || defined CONFIG_AXP209_POWER || \
     defined CONFIG_AXP221_POWER || defined CONFIG_AXP818_POWER || \
     defined CONFIG_SY8106A_POWER
 #endif
 
 #ifndef CONFIG_CONS_INDEX
 #define CONFIG_CONS_INDEX              1       /* UART0 */
 #endif
 
 #ifdef CONFIG_REQUIRE_SERIAL_CONSOLE
 #if CONFIG_CONS_INDEX == 1
 #ifdef CONFIG_MACH_SUN9I
 #define OF_STDOUT_PATH		"/soc/serial at 07000000:115200"
 #else
 #define OF_STDOUT_PATH		"/soc at 01c00000/serial at 01c28000:115200"
 #endif
 #elif CONFIG_CONS_INDEX == 2 && defined(CONFIG_MACH_SUN5I)
 #define OF_STDOUT_PATH		"/soc at 01c00000/serial at 01c28400:115200"
 #elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN6I)
 #define OF_STDOUT_PATH          "/soc at 01c00000/serial at 01c28800:115200"
 #elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN8I)
 #define OF_STDOUT_PATH		"/soc at 01c00000/serial at 01c28800:115200"
 #elif CONFIG_CONS_INDEX == 5 && defined(CONFIG_MACH_SUN8I)
 #define OF_STDOUT_PATH		"/soc at 01c00000/serial at 01f02800:115200"
 #else
 #error Unsupported console port nr. Please fix stdout-path in sunxi-common.h.
 #endif
 #endif /* ifdef CONFIG_REQUIRE_SERIAL_CONSOLE */
 
 /* GPIO */
 #define CONFIG_SUNXI_GPIO
 
 #ifdef CONFIG_VIDEO
 /*
  * The amount of RAM to keep free at the top of RAM when relocating u-boot,
  * to use as framebuffer. This must be a multiple of 4096.
  */
 #define CONFIG_SUNXI_MAX_FB_SIZE (16 << 20)
 
 /* Do we want to initialize a simple FB? */
 #define CONFIG_VIDEO_DT_SIMPLEFB
 
 /* Fallback to old sunxi_video if the driver model video driver is disabled */
 #ifndef CONFIG_VIDEO_SUNXI_DM
 #define CONFIG_VIDEO_SUNXI
 #endif
 
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 
 #define CONFIG_CMD_BMP
 #define CONFIG_SPLASH_SCREEN_ALIGN
 
 #define CONFIG_VIDEO_STD_TIMINGS
 #define CONFIG_I2C_EDID
 #define VIDEO_LINE_LEN (pGD->plnSizeX)
 
 /* allow both serial and cfb console. */
 /* stop x86 thinking in cfbconsole from trying to init a pc keyboard */
 
 #endif /* CONFIG_VIDEO */
 
 /* Ethernet support */
 #ifdef CONFIG_SUNXI_EMAC
 #define CONFIG_PHY_ADDR		1
 #define CONFIG_MII			/* MII PHY management		*/
 #define CONFIG_PHYLIB
 #endif
 
 #ifdef CONFIG_SUNXI_GMAC
 #define CONFIG_PHY_GIGE			/* GMAC can use gigabit PHY	*/
 /* Cherry-pick from A80: #define CONFIG_PHY_ADDR		1 */
 #define CONFIG_MII			/* MII PHY management		*/
 #define CONFIG_PHY_REALTEK
 #define CONFIG_PHY_MICREL
 #define CONFIG_PHY_MICREL_KSZ9031
 #endif
 
 #ifdef CONFIG_SUN8I_EMAC
 #define CONFIG_PHY_GIGE			/* GMAC can use gigabit PHY	*/
+#define CONFIG_PHY_MICREL
+#define CONFIG_PHY_MICREL_KSZ9031       /* used on A64-uQ7              */
 #endif
 
 #ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_USB_OHCI_NEW
 #define CONFIG_USB_OHCI_SUNXI
 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 1
 #endif
 
 #ifdef CONFIG_USB_MUSB_SUNXI
 #define CONFIG_USB_MUSB_PIO_ONLY
 #endif
 
 #ifdef CONFIG_USB_MUSB_GADGET
 #define CONFIG_USB_FUNCTION_MASS_STORAGE
 #endif
 
 #ifdef CONFIG_USB_FUNCTION_FASTBOOT
 #define CONFIG_FASTBOOT_BUF_SIZE	0x8000000
 #define CONFIG_SYS_BOOTM_LEN            0x1000000
 
 #define CONFIG_SUNXI_FASTBOOT_GPIO      "PM7"
 
 #ifdef CONFIG_SUNXI_FASTBOOT_GPIO
 #  define CONFIG_BOARD_LATE_INIT
 #endif
 
 #ifdef CONFIG_MMC
 #define CONFIG_FASTBOOT_FLASH_MMC_DEV	 1
 #define CONFIG_EFI_PARTITION_ENTRIES_OFF 1024000
 #define CONFIG_RANDOM_UUID
 #endif
 #endif
 
 #ifdef CONFIG_USB_FUNCTION_MASS_STORAGE
 #endif
 
 #ifdef CONFIG_USB_KEYBOARD
 #define CONFIG_PREBOOT
 #define CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE
 #endif
 
 #if !defined CONFIG_ENV_IS_IN_MMC && \
     !defined CONFIG_ENV_IS_IN_NAND && \
     !defined CONFIG_ENV_IS_IN_FAT && \
     !defined CONFIG_ENV_IS_IN_SPI_FLASH
 #define CONFIG_ENV_IS_NOWHERE
 #endif
 
 #define CONFIG_MISC_INIT_R
 
 #ifndef CONFIG_SPL_BUILD
 #include <config_distro_defaults.h>
 
 #ifdef CONFIG_ARM64
 /*
  * Boards seem to come with at least 512MB of DRAM.
  * The kernel should go at 512K, which is the default text offset (that will
  * be adjusted at runtime if needed).
  * There is no compression for arm64 kernels (yet), so leave some space
  * for really big kernels, say 256MB for now.
  * Scripts, PXE and DTBs should go afterwards, leaving the rest for the initrd.
  * Align the initrd to a 2MB page.
  */
 #define KERNEL_ADDR_R	__stringify(SDRAM_OFFSET(0080000))
 #define FDT_ADDR_R	__stringify(SDRAM_OFFSET(FA00000))
 #define SCRIPT_ADDR_R	__stringify(SDRAM_OFFSET(FC00000))
 #define PXEFILE_ADDR_R	__stringify(SDRAM_OFFSET(FD00000))
 #define RAMDISK_ADDR_R	__stringify(SDRAM_OFFSET(FE00000))
 
 #else
 /*
  * 160M RAM (256M minimum minus 64MB heap + 32MB for u-boot, stack, fb, etc.
  * 32M uncompressed kernel, 16M compressed kernel, 1M fdt,
  * 1M script, 1M pxe and the ramdisk at the end.
  */
 
 #define KERNEL_ADDR_R  __stringify(SDRAM_OFFSET(2000000))
 #define FDT_ADDR_R     __stringify(SDRAM_OFFSET(3000000))
 #define SCRIPT_ADDR_R  __stringify(SDRAM_OFFSET(3100000))
 #define PXEFILE_ADDR_R __stringify(SDRAM_OFFSET(3200000))
 #define RAMDISK_ADDR_R __stringify(SDRAM_OFFSET(3300000))
 #endif
 
 #define MEM_LAYOUT_ENV_SETTINGS \
 	"bootm_size=0xa000000\0" \
 	"kernel_addr_r=" KERNEL_ADDR_R "\0" \
 	"fdt_addr_r=" FDT_ADDR_R "\0" \
 	"scriptaddr=" SCRIPT_ADDR_R "\0" \
 	"pxefile_addr_r=" PXEFILE_ADDR_R "\0" \
 	"ramdisk_addr_r=" RAMDISK_ADDR_R "\0"
 
 #define DFU_ALT_INFO_RAM \
 	"dfu_alt_info_ram=" \
 	"kernel ram " KERNEL_ADDR_R " 0x1000000;" \
 	"fdt ram " FDT_ADDR_R " 0x100000;" \
 	"ramdisk ram " RAMDISK_ADDR_R " 0x4000000\0"
 
 #ifdef CONFIG_MMC
 #define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0)
 #if CONFIG_MMC_SUNXI_SLOT_EXTRA != -1
 #define BOOT_TARGET_DEVICES_MMC_EXTRA(func) func(MMC, mmc, 1)
 #else
 #define BOOT_TARGET_DEVICES_MMC_EXTRA(func)
 #endif
 #else
 #define BOOT_TARGET_DEVICES_MMC(func)
 #define BOOT_TARGET_DEVICES_MMC_EXTRA(func)
 #endif
 
 #ifdef CONFIG_AHCI
 #define BOOT_TARGET_DEVICES_SCSI(func) func(SCSI, scsi, 0)
 #else
 #define BOOT_TARGET_DEVICES_SCSI(func)
 #endif
 
 #ifdef CONFIG_USB_STORAGE
 #define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0)
 #else
 #define BOOT_TARGET_DEVICES_USB(func)
 #endif
 
 #ifdef CONFIG_USB_FUNCTION_FASTBOOT
 #define BOOT_TARGET_DEVICES_FASTBOOT(func) func(FASTBOOT, fastboot, 0)
 #else
 #define BOOT_TARGET_DEVICES_FASTBOOT(func)
 #endif
 
 /* FEL boot support, auto-execute boot.scr if a script address was provided */
 #define BOOTENV_DEV_FEL(devtypeu, devtypel, instance) \
 	"bootcmd_fel=" \
 		"if test -n ${fel_booted} && test -n ${fel_scriptaddr}; then " \
 			"echo '(FEL boot)'; " \
 			"source ${fel_scriptaddr}; " \
 		"fi\0"
 #define BOOTENV_DEV_NAME_FEL(devtypeu, devtypel, instance) \
 	"fel "
 
 #define BOOTENV_DEV_FASTBOOT(devtypeu, devtypel, instance) \
         "bootcmd_fastboot=" \
 	       "fastboot musb\0"
 
 #define BOOTENV_DEV_NAME_FASTBOOT(devtypeu, devtypel, instance) \
         "fastboot "
 
 #define BOOT_TARGET_DEVICES(func) \
 	func(FEL, fel, na) \
 	BOOT_TARGET_DEVICES_MMC_EXTRA(func) \
 	BOOT_TARGET_DEVICES_MMC(func) \
 	BOOT_TARGET_DEVICES_SCSI(func) \
 	BOOT_TARGET_DEVICES_USB(func) \
 	BOOT_TARGET_DEVICES_FASTBOOT(func) \
 	func(PXE, pxe, na) \
 	func(DHCP, dhcp, na)
 
 #ifdef CONFIG_OLD_SUNXI_KERNEL_COMPAT
 #define BOOTCMD_SUNXI_COMPAT \
 	"bootcmd_sunxi_compat=" \
 		"setenv root /dev/mmcblk0p3 rootwait; " \
 		"if ext2load mmc 0 0x44000000 uEnv.txt; then " \
 			"echo Loaded environment from uEnv.txt; " \
 			"env import -t 0x44000000 ${filesize}; " \
 		"fi; " \
 		"setenv bootargs console=${console} root=${root} ${extraargs}; " \
 		"ext2load mmc 0 0x43000000 script.bin && " \
 		"ext2load mmc 0 0x48000000 uImage && " \
 		"bootm 0x48000000\0"
 #else
 #define BOOTCMD_SUNXI_COMPAT
 #endif
 
 #include <config_distro_bootcmd.h>
 
 #ifdef CONFIG_USB_KEYBOARD
 #define CONSOLE_STDIN_SETTINGS \
 	"preboot=usb start\0" \
 	"stdin=serial,usbkbd\0"
 #else
 #define CONSOLE_STDIN_SETTINGS \
 	"stdin=serial\0"
 #endif
 
 #ifdef CONFIG_VIDEO
 #define CONSOLE_STDOUT_SETTINGS \
 	"stdout=serial,vga\0" \
 	"stderr=serial,vga\0"
 #else
 #define CONSOLE_STDOUT_SETTINGS \
 	"stdout=serial\0" \
 	"stderr=serial\0"
 #endif
 
 #define CONSOLE_ENV_SETTINGS \
 	CONSOLE_STDIN_SETTINGS \
 	CONSOLE_STDOUT_SETTINGS
 
 /* The space below the paritions-entries is reserved by the EFI
  * partition table (i.e. 'first_usable_lba' points to the first
  * LBA beyond the table.  We thus don't need to have any 'magic'
  * partitions for the bootloader or any other reserved areas.
  */
 #define CONFIG_EFI_PARTITION_ENTRIES_OFF 1024000
 #define PARTS_DEFAULT \
   "uuid_disk=${uuid_gpt_disk};" \
   "name=resource,size=16M;" \
   "name=boot,size=16M;" \
   "name=system,size=500M,uuid=69dad710-2ce4-4e3c-b16c-21a1d49abed3;" \
   "name=cache,size=256M;" \
   "name=databk,size=128M;" \
   "name=data,size=-,uuid=933ac7e1-2eb4-4f13-b844-0e14e2aef915;"
 
 #if (CONFIG_CONS_INDEX == 1)
 #define CONSOLE_DEFAULT "console=ttyS0,115200\0"
 #elif (CONFIG_CONS_INDEX == 3)
 #define CONSOLE_DEFAULT "console=ttyS2,115200\0"
 #else
 #error "CONFIG_CONS_INDEX to CONFIG_DEFAULT_CONSOLE_ENV missing."
 #endif
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	CONSOLE_ENV_SETTINGS \
 	MEM_LAYOUT_ENV_SETTINGS \
 	DFU_ALT_INFO_RAM \
 	"partitions=" PARTS_DEFAULT "\0" \
 	"partitions_linux=" \
         "uuid_disk=${uuid_gpt_disk};" \
 	"name=rootfs,size=-,uuid=69dad710-2ce4-4e3c-b16c-21a1d49abed3\0" \
 	"fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
 	CONSOLE_DEFAULT \
 	BOOTCMD_SUNXI_COMPAT \
 	BOOTENV
 
 #else /* ifndef CONFIG_SPL_BUILD */
 #define CONFIG_EXTRA_ENV_SETTINGS
 #endif
 
 #endif /* _SUNXI_COMMON_CONFIG_H */
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH v1 1/2] sun8i: define CONFIG_PHY_GIGE for EMAC
  2017-02-17 17:47 ` [U-Boot] [PATCH v1 1/2] sun8i: define CONFIG_PHY_GIGE for EMAC Philipp Tomsich
@ 2017-02-21  3:55   ` Chen-Yu Tsai
  2017-02-21 19:55   ` Maxime Ripard
  1 sibling, 0 replies; 13+ messages in thread
From: Chen-Yu Tsai @ 2017-02-21  3:55 UTC (permalink / raw)
  To: u-boot

On Sat, Feb 18, 2017 at 1:47 AM, Philipp Tomsich
<philipp.tomsich@theobroma-systems.com> wrote:
> From: Klaus Goger <klaus.goger@theobroma-systems.com>
>
> CONFIG_PHY_GIGE needs to be defined for miiphy_speed to report correct speed.
>
> Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
> Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

Reviewed-by: Chen-Yu Tsai <wens@csie.org>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH v1 1/2] sun8i: define CONFIG_PHY_GIGE for EMAC
  2017-02-17 17:47 ` [U-Boot] [PATCH v1 1/2] sun8i: define CONFIG_PHY_GIGE for EMAC Philipp Tomsich
  2017-02-21  3:55   ` Chen-Yu Tsai
@ 2017-02-21 19:55   ` Maxime Ripard
  2017-02-21 20:37     ` Dr. Philipp Tomsich
  1 sibling, 1 reply; 13+ messages in thread
From: Maxime Ripard @ 2017-02-21 19:55 UTC (permalink / raw)
  To: u-boot

On Fri, Feb 17, 2017 at 06:47:54PM +0100, Philipp Tomsich wrote:
> +#ifdef CONFIG_SUN8I_EMAC
> +#define CONFIG_PHY_GIGE			/* GMAC can use gigabit PHY	*/
> +#endif

It would make more sense to move that option to Kconfig, and selecting
it from SUN8I_EMAC.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170221/1a51154d/attachment.sig>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH v1 2/2] sun8i: enable support for the Micrel KSZ9031 with SUN8I_EMAC
  2017-02-17 17:47 ` [U-Boot] [PATCH v1 2/2] sun8i: enable support for the Micrel KSZ9031 with SUN8I_EMAC Philipp Tomsich
@ 2017-02-21 19:56   ` Maxime Ripard
  2017-02-21 20:35     ` Dr. Philipp Tomsich
  0 siblings, 1 reply; 13+ messages in thread
From: Maxime Ripard @ 2017-02-21 19:56 UTC (permalink / raw)
  To: u-boot

On Fri, Feb 17, 2017 at 06:47:55PM +0100, Philipp Tomsich wrote:
>  #ifdef CONFIG_SUN8I_EMAC
>  #define CONFIG_PHY_GIGE			/* GMAC can use gigabit PHY	*/
> +#define CONFIG_PHY_MICREL
> +#define CONFIG_PHY_MICREL_KSZ9031       /* used on A64-uQ7              */
>  #endif

Same thing here, and that way you could enable it only on the board
defconfig.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170221/66d3c559/attachment.sig>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH v1 2/2] sun8i: enable support for the Micrel KSZ9031 with SUN8I_EMAC
  2017-02-21 19:56   ` Maxime Ripard
@ 2017-02-21 20:35     ` Dr. Philipp Tomsich
  2017-02-22 14:45       ` Dr. Philipp Tomsich
  0 siblings, 1 reply; 13+ messages in thread
From: Dr. Philipp Tomsich @ 2017-02-21 20:35 UTC (permalink / raw)
  To: u-boot

Maxime,

> On 21 Feb 2017, at 20:56, Maxime Ripard <maxime.ripard@free-electrons.com> wrote:
> 
> On Fri, Feb 17, 2017 at 06:47:55PM +0100, Philipp Tomsich wrote:
>> #ifdef CONFIG_SUN8I_EMAC
>> #define CONFIG_PHY_GIGE			/* GMAC can use gigabit PHY	*/
>> +#define CONFIG_PHY_MICREL
>> +#define CONFIG_PHY_MICREL_KSZ9031       /* used on A64-uQ7              */
>> #endif
> 
> Same thing here, and that way you could enable it only on the board
> defconfig.

CONFIG_PHY_MICREL_KSZ9031 is not exported via Kconfig today.
I?m happy to see this moved to Kconfig & defconfig, but just checking
if that info changes anything?

Regards,
Phil.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH v1 1/2] sun8i: define CONFIG_PHY_GIGE for EMAC
  2017-02-21 19:55   ` Maxime Ripard
@ 2017-02-21 20:37     ` Dr. Philipp Tomsich
  2017-02-22 17:18       ` Maxime Ripard
  0 siblings, 1 reply; 13+ messages in thread
From: Dr. Philipp Tomsich @ 2017-02-21 20:37 UTC (permalink / raw)
  To: u-boot

On 21 Feb 2017, at 20:55, Maxime Ripard <maxime.ripard@free-electrons.com> wrote:
> 
> On Fri, Feb 17, 2017 at 06:47:54PM +0100, Philipp Tomsich wrote:
>> +#ifdef CONFIG_SUN8I_EMAC
>> +#define CONFIG_PHY_GIGE			/* GMAC can use gigabit PHY	*/
>> +#endif
> 
> It would make more sense to move that option to Kconfig, and selecting
> it from SUN8I_EMAC.

CONFIG_PHY_GIGE is not a Kconfig option yet and only enabled via
board-specific config files.

Let me know if this changes anything, otherwise a change and reroll
will be coming?

Phil.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH v1 2/2] sun8i: enable support for the Micrel KSZ9031 with SUN8I_EMAC
  2017-02-21 20:35     ` Dr. Philipp Tomsich
@ 2017-02-22 14:45       ` Dr. Philipp Tomsich
  2017-02-22 19:00         ` Maxime Ripard
  0 siblings, 1 reply; 13+ messages in thread
From: Dr. Philipp Tomsich @ 2017-02-22 14:45 UTC (permalink / raw)
  To: u-boot

Maxime,

> On 21 Feb 2017, at 21:35, Dr. Philipp Tomsich <philipp.tomsich@theobroma-systems.com> wrote:
> 
> Maxime,
> 
>> On 21 Feb 2017, at 20:56, Maxime Ripard <maxime.ripard@free-electrons.com> wrote:
>> 
>> On Fri, Feb 17, 2017 at 06:47:55PM +0100, Philipp Tomsich wrote:
>>> #ifdef CONFIG_SUN8I_EMAC
>>> #define CONFIG_PHY_GIGE			/* GMAC can use gigabit PHY	*/
>>> +#define CONFIG_PHY_MICREL
>>> +#define CONFIG_PHY_MICREL_KSZ9031       /* used on A64-uQ7              */
>>> #endif
>> 
>> Same thing here, and that way you could enable it only on the board
>> defconfig.

I?d really like to keep this for all SUN8I_EMAC configurations, as we
need the PHY support to initialise the pad timing parameters from the
DTS. If these are not initialised, then RGMII (i.e. Gigabit) will not work.

As we are moving towards a ?universal? U-Boot binary for sun50i and
try to put all board specific info into the DTS, I?d like to keep this in
sunxi-common.h to ensure that nobody rebuild without it and then
has issues on our boards.

Regards,
Philipp.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH v1 1/2] sun8i: define CONFIG_PHY_GIGE for EMAC
  2017-02-21 20:37     ` Dr. Philipp Tomsich
@ 2017-02-22 17:18       ` Maxime Ripard
  2017-02-22 17:24         ` Dr. Philipp Tomsich
  0 siblings, 1 reply; 13+ messages in thread
From: Maxime Ripard @ 2017-02-22 17:18 UTC (permalink / raw)
  To: u-boot

On Tue, Feb 21, 2017 at 09:37:14PM +0100, Dr. Philipp Tomsich wrote:
> On 21 Feb 2017, at 20:55, Maxime Ripard <maxime.ripard@free-electrons.com> wrote:
> > 
> > On Fri, Feb 17, 2017 at 06:47:54PM +0100, Philipp Tomsich wrote:
> >> +#ifdef CONFIG_SUN8I_EMAC
> >> +#define CONFIG_PHY_GIGE			/* GMAC can use gigabit PHY	*/
> >> +#endif
> > 
> > It would make more sense to move that option to Kconfig, and selecting
> > it from SUN8I_EMAC.
> 
> CONFIG_PHY_GIGE is not a Kconfig option yet and only enabled via
> board-specific config files.

Which is exactly what I was suggesting to do, sorry if it wasn't clear
:)

We're still in the phase of getting options moved to kconfig, so this
seems like the perfect occasion to do so.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170222/c3d22a9d/attachment.sig>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH v1 1/2] sun8i: define CONFIG_PHY_GIGE for EMAC
  2017-02-22 17:18       ` Maxime Ripard
@ 2017-02-22 17:24         ` Dr. Philipp Tomsich
  0 siblings, 0 replies; 13+ messages in thread
From: Dr. Philipp Tomsich @ 2017-02-22 17:24 UTC (permalink / raw)
  To: u-boot


> On 22 Feb 2017, at 18:18, Maxime Ripard <maxime.ripard@free-electrons.com> wrote:
> 
> On Tue, Feb 21, 2017 at 09:37:14PM +0100, Dr. Philipp Tomsich wrote:
>> On 21 Feb 2017, at 20:55, Maxime Ripard <maxime.ripard@free-electrons.com> wrote:
>>> 
>>> On Fri, Feb 17, 2017 at 06:47:54PM +0100, Philipp Tomsich wrote:
>>>> +#ifdef CONFIG_SUN8I_EMAC
>>>> +#define CONFIG_PHY_GIGE			/* GMAC can use gigabit PHY	*/
>>>> +#endif
>>> 
>>> It would make more sense to move that option to Kconfig, and selecting
>>> it from SUN8I_EMAC.
>> 
>> CONFIG_PHY_GIGE is not a Kconfig option yet and only enabled via
>> board-specific config files.
> 
> Which is exactly what I was suggesting to do, sorry if it wasn't clear
> :)
> 
> We're still in the phase of getting options moved to kconfig, so this
> seems like the perfect occasion to do so.

Looks like this will be one of the many v2 patches for today.
All I have to do now is to get my patch-format right ;-)

Cheers,
Philipp.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH v1 2/2] sun8i: enable support for the Micrel KSZ9031 with SUN8I_EMAC
  2017-02-22 14:45       ` Dr. Philipp Tomsich
@ 2017-02-22 19:00         ` Maxime Ripard
  2017-02-22 21:03           ` Dr. Philipp Tomsich
  0 siblings, 1 reply; 13+ messages in thread
From: Maxime Ripard @ 2017-02-22 19:00 UTC (permalink / raw)
  To: u-boot

On Wed, Feb 22, 2017 at 03:45:41PM +0100, Dr. Philipp Tomsich wrote:
> Maxime,
> 
> > On 21 Feb 2017, at 21:35, Dr. Philipp Tomsich <philipp.tomsich@theobroma-systems.com> wrote:
> > 
> > Maxime,
> > 
> >> On 21 Feb 2017, at 20:56, Maxime Ripard <maxime.ripard@free-electrons.com> wrote:
> >> 
> >> On Fri, Feb 17, 2017 at 06:47:55PM +0100, Philipp Tomsich wrote:
> >>> #ifdef CONFIG_SUN8I_EMAC
> >>> #define CONFIG_PHY_GIGE			/* GMAC can use gigabit PHY	*/
> >>> +#define CONFIG_PHY_MICREL
> >>> +#define CONFIG_PHY_MICREL_KSZ9031       /* used on A64-uQ7              */
> >>> #endif
> >> 
> >> Same thing here, and that way you could enable it only on the board
> >> defconfig.
> 
> I?d really like to keep this for all SUN8I_EMAC configurations, as we
> need the PHY support to initialise the pad timing parameters from the
> DTS. If these are not initialised, then RGMII (i.e. Gigabit) will not work.

I'm not really discussing whether it is needed or not.

> As we are moving towards a ?universal? U-Boot binary for sun50i and
> try to put all board specific info into the DTS, I?d like to keep this in
> sunxi-common.h to ensure that nobody rebuild without it and then
> has issues on our boards.

I'm not buying the whole universal U-Boot binary thing, but that's
really not related to the discussion. sunxi-common.h should be
reduced, not expanded to cover new stuff, in favor of Kconfig.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170222/781e9afc/attachment.sig>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH v1 2/2] sun8i: enable support for the Micrel KSZ9031 with SUN8I_EMAC
  2017-02-22 19:00         ` Maxime Ripard
@ 2017-02-22 21:03           ` Dr. Philipp Tomsich
  0 siblings, 0 replies; 13+ messages in thread
From: Dr. Philipp Tomsich @ 2017-02-22 21:03 UTC (permalink / raw)
  To: u-boot

Maxime,

> On 22 Feb 2017, at 20:00, Maxime Ripard <maxime.ripard@free-electrons.com> wrote:
> 
> On Wed, Feb 22, 2017 at 03:45:41PM +0100, Dr. Philipp Tomsich wrote:
>> Maxime,
>> 
>>> On 21 Feb 2017, at 21:35, Dr. Philipp Tomsich <philipp.tomsich@theobroma-systems.com> wrote:
>>> 
>>> Maxime,
>>> 
>>>> On 21 Feb 2017, at 20:56, Maxime Ripard <maxime.ripard@free-electrons.com> wrote:
>>>> 
>>>> On Fri, Feb 17, 2017 at 06:47:55PM +0100, Philipp Tomsich wrote:
>>>>> #ifdef CONFIG_SUN8I_EMAC
>>>>> #define CONFIG_PHY_GIGE			/* GMAC can use gigabit PHY	*/
>>>>> +#define CONFIG_PHY_MICREL
>>>>> +#define CONFIG_PHY_MICREL_KSZ9031       /* used on A64-uQ7              */
>>>>> #endif
>>>> 
>>>> Same thing here, and that way you could enable it only on the board
>>>> defconfig.
>> 
>> I?d really like to keep this for all SUN8I_EMAC configurations, as we
>> need the PHY support to initialise the pad timing parameters from the
>> DTS. If these are not initialised, then RGMII (i.e. Gigabit) will not work.
> 
> I'm not really discussing whether it is needed or not.

The discussion is moot anyway, as I had this change already committed
for v2 this afternoon.

>> As we are moving towards a ?universal? U-Boot binary for sun50i and
>> try to put all board specific info into the DTS, I?d like to keep this in
>> sunxi-common.h to ensure that nobody rebuild without it and then
>> has issues on our boards.
> 
> I'm not buying the whole universal U-Boot binary thing, but that's
> really not related to the discussion. sunxi-common.h should be
> reduced, not expanded to cover new stuff, in favor of Kconfig.

I?ve just put v2 onto the list and only touch the SUN8I_EMAC in v2.
The same should be done for SUNXI_GMAC and we?ll cycle back to it,
once the DM stuff is done (so we can update our A31 support to it and
release any pending changes left over from the A31-uQ7).

Regards,
Philipp.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-02-22 21:03 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-17 17:47 [U-Boot] [PATCH v1 0/2] sunxi: Gigabit PHY support for SUN8I_EMAC Philipp Tomsich
2017-02-17 17:47 ` [U-Boot] [PATCH v1 1/2] sun8i: define CONFIG_PHY_GIGE for EMAC Philipp Tomsich
2017-02-21  3:55   ` Chen-Yu Tsai
2017-02-21 19:55   ` Maxime Ripard
2017-02-21 20:37     ` Dr. Philipp Tomsich
2017-02-22 17:18       ` Maxime Ripard
2017-02-22 17:24         ` Dr. Philipp Tomsich
2017-02-17 17:47 ` [U-Boot] [PATCH v1 2/2] sun8i: enable support for the Micrel KSZ9031 with SUN8I_EMAC Philipp Tomsich
2017-02-21 19:56   ` Maxime Ripard
2017-02-21 20:35     ` Dr. Philipp Tomsich
2017-02-22 14:45       ` Dr. Philipp Tomsich
2017-02-22 19:00         ` Maxime Ripard
2017-02-22 21:03           ` Dr. Philipp Tomsich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.