ARM: mx6: Add support for Kosagi Novena
Subsystems (2)
PATCH v5 1/1 ARM: mx6: Add support for Kosagi Novena
Add support for the Kosagi Novena board. Currently supported are:
- I2C busses
- FEC Ethernet
- MMC0, MMC1, Booting from MMC
- SATA
- USB ports
- USB Ethernet
--- arch/arm/Kconfig | 4 + board/kosagi/novena/Kconfig | 23 ++ board/kosagi/novena/Makefile | 11 + board/kosagi/novena/novena.c | 342 +++++++++++++++++++++++ board/kosagi/novena/novena_spl.c | 581 +++++++++++++++++++++++++++++++++++++++ board/kosagi/novena/setup.cfg | 47 ++++ configs/novena_defconfig | 4 + include/configs/imx6_spl.h | 2 +- include/configs/novena.h | 303 ++++++++++++++++++++ 9 files changed, 1316 insertions(+), 1 deletion(-) create mode 100644 board/kosagi/novena/Kconfig create mode 100644 board/kosagi/novena/Makefile create mode 100644 board/kosagi/novena/novena.c create mode 100644 board/kosagi/novena/novena_spl.c create mode 100644 board/kosagi/novena/setup.cfg create mode 100644 configs/novena_defconfig create mode 100644 include/configs/novena.h
V2: - Drop the tegra_keyboard_init() comment altogether
- Immediatelly return from the SD controller probe function on failure
- Rename PFUZE100_PMIC to just PFUZE100
- Fix the IMX OTP support with CMD_FUSE
- Enabling LVDS clock is still in place, since this is coming soon.
V3: - Zap rootpath builtin env
V4: - Zap the checkpatch issues
- Update comments
V5: - Don't configure VGEN1
- Set FPGA into reset in SPL
- Drop ECSPI1 and add ECSPI3 mux
- Drop UART1 and add UART3, UART4 muxes
- Add separate mux option for the RGMII pins which doesn't set SPEED field
- Move the configuration of RGMII after they were configured in GPIO mode
arch/arm/Kconfig +4 -0
@@ -411,6 +411,9 @@ config TARGET_GW_VENTANA config TARGET_HUMMINGBOARD bool "Support hummingboard" +config TARGET_KOSAGI_NOVENA + bool "Support Kosagi Novena" + config TARGET_TQMA6 bool "TQ Systems TQMa6 board"
@@ -637,6 +640,7 @@ source "board/imx31_phycore/Kconfig" source "board/isee/igep0033/Kconfig" source "board/jornada/Kconfig" source "board/karo/tx25/Kconfig" +source "board/kosagi/novena/Kconfig" source "board/logicpd/imx27lite/Kconfig" source "board/logicpd/imx31_litekit/Kconfig" source "board/mpl/vcma9/Kconfig"
board/kosagi/novena/Kconfig new file +23 -0
@@ -0,0 +1,23 @@ +if TARGET_KOSAGI_NOVENA + +config SYS_CPU + string + default "armv7" + +config SYS_BOARD + string + default "novena" + +config SYS_VENDOR + string + default "kosagi" + +config SYS_SOC + string + default "mx6" + +config SYS_CONFIG_NAME + string + default "novena" + +endif
board/kosagi/novena/Makefile new file +11 -0
@@ -0,0 +1,11 @@ +# +# Copyright (C) 2014 Marek Vasut <[email protected]> +# +# SPDX-License-Identifier: GPL-2.0+ +# + +ifdef CONFIG_SPL_BUILD +obj-y := novena_spl.o +else +obj-y := novena.o +endif
board/kosagi/novena/novena.c new file +342 -0
342 lines not on this page · raw message
board/kosagi/novena/novena_spl.c new file +581 -0
581 lines not on this page · raw message
board/kosagi/novena/setup.cfg new file +47 -0
47 lines not on this page · raw message
configs/novena_defconfig new file +4 -0
@@ -0,0 +1,4 @@ +CONFIG_SPL=y +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/kosagi/novena/setup.cfg,MX6Q,SPL" ++S:CONFIG_ARM=y ++S:CONFIG_TARGET_KOSAGI_NOVENA=y
include/configs/imx6_spl.h +1 -1
@@ -27,7 +27,7 @@#define CONFIG_SYS_THUMB_BUILD #define CONFIG_SPL_LDSCRIPT "arch/arm/cpu/armv7/omap-common/u-boot-spl.lds"#define CONFIG_SPL_TEXT_BASE 0x00908000 -#define CONFIG_SPL_MAX_SIZE (64 * 1024) +#define CONFIG_SPL_MAX_SIZE 0x10000#define CONFIG_SPL_START_S_PATH "arch/arm/cpu/armv7"#define CONFIG_SPL_STACK 0x0091FFB8#define CONFIG_SPL_LIBCOMMON_SUPPORT
include/configs/novena.h new file +303 -0
303 lines not on this page · raw message
Signature · 1 line
2.0.0
PATCH v5 1/1 ARM: mx6: Add support for Kosagi Novena
Quoted 8 lines · Marek Vasut
Add support for the Kosagi Novena board. Currently supported are:
- I2C busses
- FEC Ethernet
- MMC0, MMC1, Booting from MMC
- SATA
- USB ports
- USB Ethernet
This patch looks good. It resets the FPGA, muxes the correct UART lines, and detects USB devices. It doesn't have the newer FEC reset sequence, but is the idea for Nikolay to submit that separately in order to get credit for it?
Sean
PATCH v5 1/1 ARM: mx6: Add support for Kosagi Novena
Quoted 9 lines · Sean Cross
Quoted 7 lines · Marek Vasut
Add support for the Kosagi Novena board. Currently supported are:
- I2C busses
- FEC Ethernet
- MMC0, MMC1, Booting from MMC
- SATA
- USB ports
- USB Ethernet
Quoted 4 lines
This patch looks good. It resets the FPGA, muxes the correct UART lines, and detects USB devices. It doesn't have the newer FEC reset sequence, but is the idea for Nikolay to submit that separately in order to get credit for it?
I would be happy to do it that way, what do you think ?
Best regards,
Marek Vasut
PATCH v5 1/1 ARM: mx6: Add support for Kosagi Novena
In reply to Marek VasutHi Marek,
I'm marking only the critical issues that are left unfixed from previous conversations, to speed-up the process a little bit.
I'll send later patches for the non-critical issues to spare you the extra work (and I'm sure my constructive criticism is already boring :D ).
Quoted 1 line · Marek Vasut
+#define
NOVENA_USB_HUB_RESETIMX_GPIO_NR(7, 12)
...
Quoted 5 lines
board/kosagi/novena/novena.c new file +5
-0+/* +* USB +*/ +#ifdef CONFIG_USB_EHCI_MX6 +int board_ehci_hcd_init (int port)
board/kosagi/novena/novena.c line 154
Quoted 10 lines
board/kosagi/novena/novena.c new file +10
-0+{ +/* Reset USB hub */ +if (port ==1 ) { +gpio_set_value (NOVENA_USB_HUB_RESET ,0 ); +mdelay (2 ); +gpio_set_value (NOVENA_USB_HUB_RESET ,1 ); + } +return 0 ; +} +#endif
As we previously discussed, this pin definition conflicts with NOVENA_PCIE_POWER_ON_GPIO (GPIO7_IO12 is connected to PCIE_PWRON), so by asserting it, you'll turn-off the wrong sub-system.
Currently the USB hub is reset only by system reset (RESETBMCU asserted by the PMIC). I don't see how the CPU can selectively reset the USB hub via a GPIO, so it would be better to remove the reset code.
@Sean - can you please confirm/reject this finding?
Quoted 1 line
+#define
NOVENA_AUDIO_PWRONIMX_GPIO_NR(5, 17)
...
board/kosagi/novena/novena_spl.c line 80
Quoted 7 lines
board/kosagi/novena/novena_spl.c new file +7
-0+/* +* Audio +*/ +static iomux_v3_cfg_t audio_pads[] = { +/* AUD_PWRON */ +MX6_PAD_DISP0_DAT23__GPIO5_IO17 |MUX_PAD_CTRL (NO_PAD_CTRL ), +};
The speaker amplifiers will still be disabled, as AUDIO_PWRON is not connected to them (R30A is marked as DNP). You need to add one more GPIO to enable the speaker amplifiers, here's the fix:
#define NOVENA_AUDIO_PWRON IMX_GPIO_NR(5, 17)
#define NOVENA_AUDIO_SPK_AMP_ON IMX_GPIO_NR(4, 9)
/*
* Audio
*/
static iomux_v3_cfg_t audio_pads[] = {
/* AUD_PWRON */
MX6_PAD_KEY_ROW1__GPIO5_IO17 | MUX_PAD_CTRL(NO_PAD_CTRL),
/* Speakers' amplifiers #SHDWN */
MX6_PAD_KEY_ROW1__GPIO4_IO09 | MUX_PAD_CTRL(NO_PAD_CTRL),
};static void novena_spl_setup_iomux_audio(void)
{
imx_iomux_v3_setup_multiple_pads(audio_pads, ARRAY_SIZE(audio_pads));
gpio_direction_output(NOVENA_AUDIO_PWRON, 1);
gpio_direction_output(NOVENA_AUDIO_SPK_AMP_ON, 1);
}Side comment: If someone needs to talk to the Audio Codec via I2C3 in U-Boot environment, don't be surprised if the codec doesn't respond to any I2C requests at all (I've had such issues with SGTL5000). The most probable reason is that the codec doesn't receive reference clock from imx6 GPIO0. This is not a critical issues as later the kernel muxes this GPIO0 properly, but keep this in mind if you want to hack the audio-codec at low level.
Kind regards,
Nikolay
PATCH v5 1/1 ARM: mx6: Add support for Kosagi Novena
Quoted 76 lines · Nikolay Dimitrov
Hi Marek,
I'm marking only the critical issues that are left unfixed from previous conversations, to speed-up the process a little bit. I'll send later patches for the non-critical issues to spare you the extra work (and I'm sure my constructive criticism is already boring :D ).
Quoted 1 line · Marek Vasut
+#define
NOVENA_USB_HUB_RESETIMX_GPIO_NR(7, 12)...
Quoted 5 lines
board/kosagi/novena/novena.c new file +5
-0+/* +* USB +*/ +#ifdef CONFIG_USB_EHCI_MX6 +int board_ehci_hcd_init (int port)board/kosagi/novena/novena.c line 154
Quoted 10 lines
board/kosagi/novena/novena.c new file +10
-0+{ +/* Reset USB hub */ +if (port ==1 ) { +gpio_set_value (NOVENA_USB_HUB_RESET ,0 ); +mdelay (2 ); +gpio_set_value (NOVENA_USB_HUB_RESET ,1 ); + } +return 0 ; +} +#endif As we previously discussed, this pin definition conflicts with
NOVENA_PCIE_POWER_ON_GPIO(GPIO7_IO12is connected toPCIE_PWRON), so by asserting it, you'll turn-off the wrong sub-system.Currently the USB hub is reset only by system reset (RESETBMCU asserted by the PMIC). I don't see how the CPU can selectively reset the USB hub via a GPIO, so it would be better to remove the reset code.
@Sean - can you please confirm/reject this finding?
Quoted 1 line
+#define
NOVENA_AUDIO_PWRONIMX_GPIO_NR(5, 17)...
board/kosagi/novena/novena_spl.c line 80
Quoted 7 lines
board/kosagi/novena/novena_spl.c new file +7
-0+/* +* Audio +*/ +static iomux_v3_cfg_t audio_pads[] = { +/* AUD_PWRON */ +MX6_PAD_DISP0_DAT23__GPIO5_IO17 |MUX_PAD_CTRL (NO_PAD_CTRL ), +};The speaker amplifiers will still be disabled, as
AUDIO_PWRONis not connected to them (R30A is marked as DNP). You need to add one more GPIO to enable the speaker amplifiers, here's the fix:#define
NOVENA_AUDIO_PWRONIMX_GPIO_NR(5, 17)
#defineNOVENA_AUDIO_SPK_AMP_ONIMX_GPIO_NR(4, 9)/*
* Audio
*/static iomux_v3_cfg_t audio_pads[] = { /* AUD_PWRON */ MX6_PAD_KEY_ROW1__GPIO5_IO17 | MUX_PAD_CTRL(NO_PAD_CTRL), /* Speakers' amplifiers #SHDWN */ MX6_PAD_KEY_ROW1__GPIO4_IO09 | MUX_PAD_CTRL(NO_PAD_CTRL), };static void
novena_spl_setup_iomux_audio(void){ imx_iomux_v3_setup_multiple_pads(audio_pads, ARRAY_SIZE(audio_pads)); gpio_direction_output(NOVENA_AUDIO_PWRON, 1); gpio_direction_output(NOVENA_AUDIO_SPK_AMP_ON, 1); }
Quoted 7 lines
Side comment: If someone needs to talk to the Audio Codec via I2C3 in U-Boot environment, don't be surprised if the codec doesn't respond to any I2C requests at all (I've had such issues with SGTL5000). The most probable reason is that the codec doesn't receive reference clock from imx6 GPIO0. This is not a critical issues as later the kernel muxes this GPIO0 properly, but keep this in mind if you want to hack the audio-codec at low level.
The audio codec ought to answer even when the reference clock isn't active. I actually can't recall, but I think the digital side still works. The audio codec needs to be turned on because otherwise it will pull the SCL and SCK lines low, blocking I2C3 from working at all.
Actually, now that I'm looking at it, we just had to make an ECO to get rid of SPK_AMP_ON. It is now ganged to AUDIO_PWRON, because SPK_AMP_ON was accidentally dual-purposed as a GPIO for the front button on the desktop / laptop. This change was made very recently (last Friday I think), and we'll be switching resistors on the mainboard when they're built in order to make the change. That pin should still be muxed as a GPIO, it's just an input now rather than an output.
Sean
PATCH v5 1/1 ARM: mx6: Add support for Kosagi Novena
Hi Sean,
----- ????? ?? Sean Cross (xobs at kosagi.com), ?? 08.10.2014 ? 10:47 -----
Quoted 33 lines · Nikolay Dimitrov
Quoted 32 lines
Hi Marek,
I'm marking only the critical issues that are left unfixed from previous conversations, to speed-up the process a little bit. I'll send later patches for the non-critical issues to spare you the extra work (and I'm sure my constructive criticism is already boring :D ).
Quoted 1 line · Marek Vasut
+#define
NOVENA_USB_HUB_RESETIMX_GPIO_NR(7, 12)...
Quoted 5 lines
board/kosagi/novena/novena.c new file +5
-0+/* +* USB +*/ +#ifdef CONFIG_USB_EHCI_MX6 +int board_ehci_hcd_init (int port)board/kosagi/novena/novena.c line 154
Quoted 10 lines
board/kosagi/novena/novena.c new file +10
-0+{ +/* Reset USB hub */ +if (port ==1 ) { +gpio_set_value (NOVENA_USB_HUB_RESET ,0 ); +mdelay (2 ); +gpio_set_value (NOVENA_USB_HUB_RESET ,1 ); + } +return 0 ; +} +#endif As we previously discussed, this pin definition conflicts with
NOVENA_PCIE_POWER_ON_GPIO(GPIO7_IO12is connected toPCIE_PWRON), so by asserting it, you'll turn-off the wrong sub-system.
Quoted 5 lines
Quoted 5 lines
Currently the USB hub is reset only by system reset (RESETBMCU asserted by the PMIC). I don't see how the CPU can selectively reset the USB hub via a GPIO, so it would be better to remove the reset code.
@Sean - can you please confirm/reject this finding?
@Sean: Do you have any comments on USB hub reset stuff? Should we ditch entirely the reset code, or should we modify it somehow to work properly?
Quoted 45 lines
Quoted 37 lines
Quoted 1 line
+#define
NOVENA_AUDIO_PWRONIMX_GPIO_NR(5, 17)...
board/kosagi/novena/novena_spl.c line 80
Quoted 7 lines
board/kosagi/novena/novena_spl.c new file +7
-0+/* +* Audio +*/ +static iomux_v3_cfg_t audio_pads[] = { +/* AUD_PWRON */ +MX6_PAD_DISP0_DAT23__GPIO5_IO17 |MUX_PAD_CTRL (NO_PAD_CTRL ), +};The speaker amplifiers will still be disabled, as
AUDIO_PWRONis not connected to them (R30A is marked as DNP). You need to add one more GPIO to enable the speaker amplifiers, here's the fix:#define
NOVENA_AUDIO_PWRONIMX_GPIO_NR(5, 17)
#defineNOVENA_AUDIO_SPK_AMP_ONIMX_GPIO_NR(4, 9)/*
* Audio
*/static iomux_v3_cfg_t audio_pads[] = { /* AUD_PWRON */ MX6_PAD_KEY_ROW1__GPIO5_IO17 | MUX_PAD_CTRL(NO_PAD_CTRL), /* Speakers' amplifiers #SHDWN */ MX6_PAD_KEY_ROW1__GPIO4_IO09 | MUX_PAD_CTRL(NO_PAD_CTRL), };static void
novena_spl_setup_iomux_audio(void){ imx_iomux_v3_setup_multiple_pads(audio_pads, ARRAY_SIZE(audio_pads)); gpio_direction_output(NOVENA_AUDIO_PWRON, 1); gpio_direction_output(NOVENA_AUDIO_SPK_AMP_ON, 1); }Quoted 7 lines
Side comment: If someone needs to talk to the Audio Codec via I2C3 in U-Boot environment, don't be surprised if the codec doesn't respond to any I2C requests at all (I've had such issues with SGTL5000). The most probable reason is that the codec doesn't receive reference clock from imx6 GPIO0. This is not a critical issues as later the kernel muxes this GPIO0 properly, but keep this in mind if you want to hack the audio-codec at low level.
Quoted 3 lines
The audio codec ought to answer even when the reference clock isn't active. I actually can't recall, but I think the digital side still works.
Well, that would be great if it works out this way. I just shared what happened with another audio codec, to spare some frustration to others.
Quoted 2 lines
The audio codec needs to be turned on because otherwise it will pull the SCL and SCK lines low, blocking I2C3 from working at all.
Agreed.
Quoted 6 lines
Actually, now that I'm looking at it, we just had to make an ECO to get rid of
SPK_AMP_ON. It is now ganged toAUDIO_PWRON, becauseSPK_AMP_ONwas accidentally dual-purposed as a GPIO for the front button on the desktop / laptop. This change was made very recently (last Friday I think), and we'll be switching resistors on the mainboard when they're built in order to make the change.
Well, all I have is the Novena schematic (http://bunniefoo.com/novena/pvt2_release/novena_pvt2.PDF) so all my analysis is based on this PDF. On page 14, R30A is DNP, and R28A is populated, this is why I suggested this modification to enable
speaker amps. If there are schematic changes, please publish the new version
so we can use the proper schematic and reduce spam.
@Marek: According to this latest update, there's no need for my fix for NOVENA_AUDIO_SPK_AMP_ON, as your original code will work just fine with the planned schematic changes. Please disregard the fix.
Kind regards,
Nikolay
PATCH v5 1/1 ARM: mx6: Add support for Kosagi Novena
Quoted 1 line · picmaster at mail.bg
Hi Sean,
Hi all,
Quoted 37 lines
----- ????? ?? Sean Cross (xobs at kosagi.com), ?? 08.10.2014 ? 10:47 -----
Quoted 35 lines · Nikolay Dimitrov
Quoted 34 lines
Hi Marek,
I'm marking only the critical issues that are left unfixed from previous conversations, to speed-up the process a little bit. I'll send later patches for the non-critical issues to spare you the extra work (and I'm sure my constructive criticism is already boring
:D ).
Quoted 1 line · Marek Vasut
+#define
NOVENA_USB_HUB_RESETIMX_GPIO_NR(7, 12)...
Quoted 5 lines
board/kosagi/novena/novena.c new file +5
-0+/* +* USB +*/ +#ifdef CONFIG_USB_EHCI_MX6 +int board_ehci_hcd_init (int port)board/kosagi/novena/novena.c line 154
Quoted 10 lines
board/kosagi/novena/novena.c new file +10
-0+{ +/* Reset USB hub */ +if (port ==1 ) { +gpio_set_value (NOVENA_USB_HUB_RESET ,0 ); +mdelay (2 ); +gpio_set_value (NOVENA_USB_HUB_RESET ,1 ); + } +return 0 ; +} +#endif As we previously discussed, this pin definition conflicts with
NOVENA_PCIE_POWER_ON_GPIO(GPIO7_IO12is connected toPCIE_PWRON), so by asserting it, you'll turn-off the wrong sub-system.
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
Currently the USB hub is reset only by system reset (RESETBMCU asserted by the PMIC). I don't see how the CPU can selectively reset the USB hub via a GPIO, so it would be better to remove the reset code.
@Sean - can you please confirm/reject this finding?
@Sean: Do you have any comments on USB hub reset stuff? Should we ditch entirely the reset code, or should we modify it somehow to work properly?
OK, so it's just this USB that remains, right ?
PATCH v5 1/1 ARM: mx6: Add support for Kosagi Novena
Hi Marek,
Quoted 46 lines · Marek Vasut
Quoted 1 line · picmaster at mail.bg
Hi Sean,
Hi all,
Quoted 41 lines
----- ????? ?? Sean Cross (xobs at kosagi.com), ?? 08.10.2014 ? 10:47 -----
Quoted 39 lines · Nikolay Dimitrov
Quoted 38 lines
Hi Marek,
I'm marking only the critical issues that are left unfixed from previous conversations, to speed-up the process a little bit. I'll send later patches for the non-critical issues to spare you the extra work (and I'm sure my constructive criticism is already boring
:D ).
Quoted 1 line · Marek Vasut
+#define
NOVENA_USB_HUB_RESETIMX_GPIO_NR(7, 12)...
Quoted 5 lines
board/kosagi/novena/novena.c new file +5
-0+/* +* USB +*/ +#ifdef CONFIG_USB_EHCI_MX6 +int board_ehci_hcd_init (int port)board/kosagi/novena/novena.c line 154
Quoted 10 lines
board/kosagi/novena/novena.c new file +10
-0+{ +/* Reset USB hub */ +if (port ==1 ) { +gpio_set_value (NOVENA_USB_HUB_RESET ,0 ); +mdelay (2 ); +gpio_set_value (NOVENA_USB_HUB_RESET ,1 ); + } +return 0 ; +} +#endif As we previously discussed, this pin definition conflicts with
NOVENA_PCIE_POWER_ON_GPIO(GPIO7_IO12is connected toPCIE_PWRON), so by asserting it, you'll turn-off the wrong sub-system.Currently the USB hub is reset only by system reset (RESETBMCU asserted by the PMIC). I don't see how the CPU can selectively reset the USB hub via a GPIO, so it would be better to remove the reset code.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Quoted 1 line
@Sean - can you please confirm/reject this finding?
@Sean: Do you have any comments on USB hub reset stuff? Should we ditch entirely the reset code, or should we modify it somehow to work properly?
OK, so it's just this USB that remains, right ?
That's correct.
There are a bunch of non-critical things for fixing also, but we'll negotiate later about them :D.
Regards,
Nikolay
PATCH v5 1/1 ARM: mx6: Add support for Kosagi Novena
Quoted 1 line · Nikolay Dimitrov
Hi Marek,
[...]
Quoted 10 lines
Quoted 5 lines
Quoted 3 lines
@Sean: Do you have any comments on USB hub reset stuff? Should we ditch entirely the reset code, or should we modify it somehow to work properly?
OK, so it's just this USB that remains, right ?
That's correct.
There are a bunch of non-critical things for fixing also, but we'll negotiate later about them :D.
Well what are those ?
Stefano, is there still any chance that a V6 of Novena would go into this release? I guess those chances are slim, right ?
Best regards,
Marek Vasut
PATCH v5 1/1 ARM: mx6: Add support for Kosagi Novena
Hi Marek,
Quoted 9 lines · Marek Vasut
Quoted 1 line · Nikolay Dimitrov
Hi Marek,
[...]
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
@Sean: Do you have any comments on USB hub reset stuff? Should we ditch entirely the reset code, or should we modify it somehow to work properly?
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
OK, so it's just this USB that remains, right ?
That's correct.
There are a bunch of non-critical things for fixing also, but we'll negotiate later about them :D.
Well what are those ?
Stuff like removing GD memset from Novena code, as it's now handled by crt0.S, removing microSD CD pin definition as it's not used at all, improve PHY reset (both timing and signal conflicts), and about 5-6 similar things which I can't remember, need to check again your patch.
As I said, I feel bad for torturing you anyway, and tried to think which are the critical things, which will break stuff if not fixed. The other fixes need another round of more discussions, so can be pushed later.
Regards,
Nikolay
PATCH v5 1/1 ARM: mx6: Add support for Kosagi Novena
Quoted 1 line · Nikolay Dimitrov
Hi Marek,
Hi!
Quoted 14 lines · Marek Vasut
Quoted 13 lines · Nikolay Dimitrov
Quoted 1 line
Hi Marek,
[...]
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
@Sean: Do you have any comments on USB hub reset stuff? Should we ditch entirely the reset code, or should we modify it somehow to work properly?
OK, so it's just this USB that remains, right ?
That's correct.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
There are a bunch of non-critical things for fixing also, but we'll negotiate later about them :D.
Well what are those ?
Stuff like removing GD memset from Novena code, as it's now handled by
crt0.S, removing microSD CD pin definition as it's not used at all,
I fixed those two, thanks!
Quoted 6 lines
improve PHY reset (both timing and signal conflicts), and about 5-6 similar things which I can't remember, need to check again your patch.
As I said, I feel bad for torturing you anyway, and tried to think which are the critical things, which will break stuff if not fixed. The other fixes need another round of more discussions, so can be pushed later.
OK, but don't worry about the discussion. That's really perfectly OK.
Thank you!
Best regards,
Marek Vasut
PATCH v5 1/1 ARM: mx6: Add support for Kosagi Novena
In reply to Marek VasutQuoted 13 lines · Marek Vasut
Quoted 1 line · Nikolay Dimitrov
Hi Marek,
[...]
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
@Sean: Do you have any comments on USB hub reset stuff? Should we ditch entirely the reset code, or should we modify it somehow to work properly?
OK, so it's just this USB that remains, right ?
That's correct.
Quoted 7 lines
Quoted 2 lines
There are a bunch of non-critical things for fixing also, but we'll negotiate later about them :D.
Well what are those ?
Stefano, is there still any chance that a V6 of Novena would go into this release? I guess those chances are slim, right ?
Right. It looks like that it is better to take the time and fixing the open issues, else having the board just quickly into the release.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v5 1/1 ARM: mx6: Add support for Kosagi Novena
Quoted 17 lines · Stefano Babic
Quoted 16 lines · Marek Vasut
Quoted 1 line · Nikolay Dimitrov
Hi Marek,
[...]
Quoted 10 lines
Quoted 5 lines
Quoted 3 lines
@Sean: Do you have any comments on USB hub reset stuff? Should we ditch entirely the reset code, or should we modify it somehow to work properly?
OK, so it's just this USB that remains, right ?
That's correct.
There are a bunch of non-critical things for fixing also, but we'll negotiate later about them :D.
Quoted 7 lines
Quoted 4 lines
Well what are those ?
Stefano, is there still any chance that a V6 of Novena would go into this release? I guess those chances are slim, right ?
Right. It looks like that it is better to take the time and fixing the open issues, else having the board just quickly into the release.
Works for me either way, thanks!
Best regards,
Marek Vasut
PATCH v5 1/1 ARM: mx6: Add support for Kosagi Novena
In reply to Marek VasutQuoted 3 lines · Marek Vasut
Quoted 1 line · picmaster at mail.bg
Hi Sean,
Hi all,
Hello
Quoted 36 lines
Quoted 36 lines
----- ????? ?? Sean Cross (xobs at kosagi.com), ?? 08.10.2014 ? 10:47 -----
Quoted 33 lines · Nikolay Dimitrov
Quoted 32 lines
Hi Marek,
I'm marking only the critical issues that are left unfixed from previous conversations, to speed-up the process a little bit. I'll send later patches for the non-critical issues to spare you the extra work (and I'm sure my constructive criticism is already boring
:D ).
Quoted 1 line · Marek Vasut
+#define
NOVENA_USB_HUB_RESETIMX_GPIO_NR(7, 12)...
Quoted 5 lines
board/kosagi/novena/novena.c new file +5
-0+/* +* USB +*/ +#ifdef CONFIG_USB_EHCI_MX6 +int board_ehci_hcd_init (int port)board/kosagi/novena/novena.c line 154
Quoted 10 lines
board/kosagi/novena/novena.c new file +10
-0+{ +/* Reset USB hub */ +if (port ==1 ) { +gpio_set_value (NOVENA_USB_HUB_RESET ,0 ); +mdelay (2 ); +gpio_set_value (NOVENA_USB_HUB_RESET ,1 ); + } +return 0 ; +} +#endif As we previously discussed, this pin definition conflicts with
NOVENA_PCIE_POWER_ON_GPIO(GPIO7_IO12is connected toPCIE_PWRON), so by asserting it, you'll turn-off the wrong sub-system.
Quoted 8 lines
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
Currently the USB hub is reset only by system reset (RESETBMCU asserted by the PMIC). I don't see how the CPU can selectively reset the USB hub via a GPIO, so it would be better to remove the reset code.
@Sean - can you please confirm/reject this finding?
@Sean: Do you have any comments on USB hub reset stuff? Should we ditch entirely the reset code, or should we modify it somehow to work properly?
OK, so it's just this USB that remains, right ?
This is correct. There is no GPIO-based way to reset the hub.
Sean
PATCH v5 1/1 ARM: mx6: Add support for Kosagi Novena
In reply to picmaster at mail.bgHi Nikolay,
Quoted 106 lines · picmaster at mail.bg
Hi Sean,
----- ????? ?? Sean Cross (xobs at kosagi.com), ?? 08.10.2014 ? 10:47 -----
Quoted 32 lines · Nikolay Dimitrov
Quoted 31 lines
Hi Marek,
I'm marking only the critical issues that are left unfixed from previous conversations, to speed-up the process a little bit. I'll send later patches for the non-critical issues to spare you the extra work (and I'm sure my constructive criticism is already boring :D ).
Quoted 1 line · Marek Vasut
+#define
NOVENA_USB_HUB_RESETIMX_GPIO_NR(7, 12)...
Quoted 5 lines
board/kosagi/novena/novena.c new file +5
-0+/* +* USB +*/ +#ifdef CONFIG_USB_EHCI_MX6 +int board_ehci_hcd_init (int port)board/kosagi/novena/novena.c line 154
Quoted 10 lines
board/kosagi/novena/novena.c new file +10
-0+{ +/* Reset USB hub */ +if (port ==1 ) { +gpio_set_value (NOVENA_USB_HUB_RESET ,0 ); +mdelay (2 ); +gpio_set_value (NOVENA_USB_HUB_RESET ,1 ); + } +return 0 ; +} +#endif As we previously discussed, this pin definition conflicts with
NOVENA_PCIE_POWER_ON_GPIO(GPIO7_IO12is connected toPCIE_PWRON), so by asserting it, you'll turn-off the wrong sub-system.Quoted 5 lines
Quoted 5 lines
Currently the USB hub is reset only by system reset (RESETBMCU asserted by the PMIC). I don't see how the CPU can selectively reset the USB hub via a GPIO, so it would be better to remove the reset code.
@Sean - can you please confirm/reject this finding?
@Sean: Do you have any comments on USB hub reset stuff? Should we ditch entirely the reset code, or should we modify it somehow to work properly?
Quoted 43 lines
Quoted 36 lines
Quoted 1 line
+#define
NOVENA_AUDIO_PWRONIMX_GPIO_NR(5, 17)...
board/kosagi/novena/novena_spl.c line 80
Quoted 7 lines
board/kosagi/novena/novena_spl.c new file +7
-0+/* +* Audio +*/ +static iomux_v3_cfg_t audio_pads[] = { +/* AUD_PWRON */ +MX6_PAD_DISP0_DAT23__GPIO5_IO17 |MUX_PAD_CTRL (NO_PAD_CTRL ), +};The speaker amplifiers will still be disabled, as
AUDIO_PWRONis not connected to them (R30A is marked as DNP). You need to add one more GPIO to enable the speaker amplifiers, here's the fix:#define
NOVENA_AUDIO_PWRONIMX_GPIO_NR(5, 17)
#defineNOVENA_AUDIO_SPK_AMP_ONIMX_GPIO_NR(4, 9)/*
* Audio
*/static iomux_v3_cfg_t audio_pads[] = { /* AUD_PWRON */ MX6_PAD_KEY_ROW1__GPIO5_IO17 | MUX_PAD_CTRL(NO_PAD_CTRL), /* Speakers' amplifiers #SHDWN */ MX6_PAD_KEY_ROW1__GPIO4_IO09 | MUX_PAD_CTRL(NO_PAD_CTRL), };static void
novena_spl_setup_iomux_audio(void){ imx_iomux_v3_setup_multiple_pads(audio_pads, ARRAY_SIZE(audio_pads)); gpio_direction_output(NOVENA_AUDIO_PWRON, 1); gpio_direction_output(NOVENA_AUDIO_SPK_AMP_ON, 1); }Quoted 7 lines
Side comment: If someone needs to talk to the Audio Codec via I2C3 in U-Boot environment, don't be surprised if the codec doesn't respond to any I2C requests at all (I've had such issues with SGTL5000). The most probable reason is that the codec doesn't receive reference clock from imx6 GPIO0. This is not a critical issues as later the kernel muxes this GPIO0 properly, but keep this in mind if you want to hack the audio-codec at low level.
Quoted 3 lines
The audio codec ought to answer even when the reference clock isn't active. I actually can't recall, but I think the digital side still works.
Well, that would be great if it works out this way. I just shared what happened with another audio codec, to spare some frustration to others.
Quoted 2 lines
The audio codec needs to be turned on because otherwise it will pull the SCL and SCK lines low, blocking I2C3 from working at all.
Agreed.
Quoted 6 lines
Actually, now that I'm looking at it, we just had to make an ECO to get rid of
SPK_AMP_ON. It is now ganged toAUDIO_PWRON, becauseSPK_AMP_ONwas accidentally dual-purposed as a GPIO for the front button on the desktop / laptop. This change was made very recently (last Friday I think), and we'll be switching resistors on the mainboard when they're built in order to make the change.
Quoted 8 lines
Well, all I have is the Novena schematic (http://bunniefoo.com/novena/pvt2_release/novena_pvt2.PDF) so all my analysis is based on this PDF. On page 14, R30A is DNP, and R28A is populated, this is why I suggested this modification to enable
speaker amps. If there are schematic changes, please publish the new version
so we can use the proper schematic and reduce spam.@Marek: According to this latest update, there's no need for my fix for
NOVENA_AUDIO_SPK_AMP_ON, as your original code will work just fine with the planned schematic changes. Please disregard the fix.
I'll be sure to have Bunnie post a new schematic when he returns tomorrow. For now, the ECO on our wiki is the authoritative source. This is curently the only ECO for the final PVT2 board:
http://www.kosagi.com/w/index.php?title=Novena_PVT2_ECO_List#ECO22:_swap_audio_control_option
Sean
PATCH v5 1/1 ARM: mx6: Add support for Kosagi Novena
Hi Sean,
Quoted 4 lines · Sean Cross
I'll be sure to have Bunnie post a new schematic when he returns tomorrow. For now, the ECO on our wiki is the authoritative source. This is curently the only ECO for the final PVT2 board:
http://www.kosagi.com/w/index.php?title=Novena_PVT2_ECO_List#ECO22:_swap_audio_control_option
Thanks for sharing the link to ECO list, it will definitely help (well, shame on me that I didn't find this earler, doh).
Still, if you think it's possible to release at some point an updated PDF schematic that integrates all currently approved ECOs, it will be even better.
Regards,
Nikolay
PATCH v5 1/1 ARM: mx6: Add support for Kosagi Novena
In reply to Nikolay DimitrovQuoted 6 lines · Nikolay Dimitrov
Hi Marek,
I'm marking only the critical issues that are left unfixed from previous conversations, to speed-up the process a little bit.
I'll send later patches for the non-critical issues to spare you the extra work (and I'm sure my constructive criticism is already boring :D ).
It's actually not, I like how multiple eyeballs on the code do spot these issues. On the other hand, I should have probably gone through the schematic one more time and not base this whole thing only on the original code ;-)
Best regards,
Marek Vasut
PATCH v5 1/1 ARM: mx6: Add support for Kosagi Novena
In reply to Marek VasutHi Marek,
Quoted 74 lines · Marek Vasut
Add support for the Kosagi Novena board. Currently supported are:
- I2C busses
- FEC Ethernet
- MMC0, MMC1, Booting from MMC
- SATA
- USB ports
- USB EthernetSigned-off-by Marek Vasut <[email protected]>Cc Stefano Babic <[email protected]>Cc Sean Cross <[email protected]>Cc Nikolay Dimitrov <[email protected]>--- arch/arm/Kconfig | 4 + board/kosagi/novena/Kconfig | 23 ++ board/kosagi/novena/Makefile | 11 + board/kosagi/novena/novena.c | 342 +++++++++++++++++++++++ board/kosagi/novena/novena_spl.c | 581 +++++++++++++++++++++++++++++++++++++++ board/kosagi/novena/setup.cfg | 47 ++++ configs/novena_defconfig | 4 + include/configs/imx6_spl.h | 2 +- include/configs/novena.h | 303 ++++++++++++++++++++ 9 files changed, 1316 insertions(+), 1 deletion(-) create mode 100644 board/kosagi/novena/Kconfig create mode 100644 board/kosagi/novena/Makefile create mode 100644 board/kosagi/novena/novena.c create mode 100644 board/kosagi/novena/novena_spl.c create mode 100644 board/kosagi/novena/setup.cfg create mode 100644 configs/novena_defconfig create mode 100644 include/configs/novena.hV2: - Drop the
tegra_keyboard_init()comment altogether
- Immediatelly return from the SD controller probe function on failure
- RenamePFUZE100_PMICto just PFUZE100
- Fix the IMX OTP support withCMD_FUSE
- Enabling LVDS clock is still in place, since this is coming soon.
V3: - Zap rootpath builtin env
V4: - Zap the checkpatch issues
- Update comments
V5: - Don't configure VGEN1
- Set FPGA into reset in SPL
- Drop ECSPI1 and add ECSPI3 mux
- Drop UART1 and add UART3, UART4 muxes
- Add separate mux option for the RGMII pins which doesn't set SPEED field
- Move the configuration of RGMII after they were configured in GPIO modearch/arm/Kconfig +4
-0@@ -411,6 +411,9 @@ config TARGET_GW_VENTANA config TARGET_HUMMINGBOARD bool "Support hummingboard" +config TARGET_KOSAGI_NOVENA + bool "Support Kosagi Novena" + config TARGET_TQMA6 bool "TQ Systems TQMa6 board"@@ -637,6 +640,7 @@ source "board/imx31_phycore/Kconfig" source "board/isee/igep0033/Kconfig" source "board/jornada/Kconfig" source "board/karo/tx25/Kconfig" +source "board/kosagi/novena/Kconfig" source "board/logicpd/imx27lite/Kconfig" source "board/logicpd/imx31_litekit/Kconfig" source "board/mpl/vcma9/Kconfig"board/kosagi/novena/Kconfig new file +0
-0
board/kosagi/novena/Kconfig line 5
Quoted 5 lines
board/kosagi/novena/Kconfig new file +5
-0@@ -0,0 +1,23 @@ +if TARGET_KOSAGI_NOVENA + +config SYS_CPU + string + default "armv7"
See http://patchwork.ozlabs.org/patch/397186/.
According to Masahiro, "strings" is not required and can be dropped.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v5 1/1 ARM: mx6: Add support for Kosagi Novena
Quoted 101 lines · Stefano Babic
Hi Marek,
Quoted 90 lines · Marek Vasut
Add support for the Kosagi Novena board. Currently supported are:
- I2C busses
- FEC Ethernet
- MMC0, MMC1, Booting from MMC
- SATA
- USB ports
- USB EthernetSigned-off-by Marek Vasut <[email protected]>Cc Stefano Babic <[email protected]>Cc Sean Cross <[email protected]>Cc Nikolay Dimitrov <[email protected]>---
arch/arm/Kconfig | 4 + board/kosagi/novena/Kconfig | 23 ++ board/kosagi/novena/Makefile | 11 + board/kosagi/novena/novena.c | 342 +++++++++++++++++++++++ board/kosagi/novena/novena_spl.c | 581 +++++++++++++++++++++++++++++++++++++++ board/kosagi/novena/setup.cfg | 47 ++++ configs/novena_defconfig | 4 + include/configs/imx6_spl.h | 2 +- include/configs/novena.h | 303 ++++++++++++++++++++ 9 files changed, 1316 insertions(+), 1 deletion(-) create mode 100644 board/kosagi/novena/Kconfig create mode 100644 board/kosagi/novena/Makefile create mode 100644 board/kosagi/novena/novena.c create mode 100644 board/kosagi/novena/novena_spl.c create mode 100644 board/kosagi/novena/setup.cfg create mode 100644 configs/novena_defconfig create mode 100644 include/configs/novena.hV2: - Drop the
tegra_keyboard_init()comment altogether- Immediatelly return from the SD controller probe function on failure - Rename
PFUZE100_PMICto just PFUZE100
- Fix the IMX OTP support withCMD_FUSE
- Enabling LVDS clock is still in place, since this is coming soon.V3: - Zap rootpath builtin env
V4: - Zap the checkpatch issues- Update comments
V5: - Don't configure VGEN1
- Set FPGA into reset in SPL
- Drop ECSPI1 and add ECSPI3 mux
- Drop UART1 and add UART3, UART4 muxes
- Add separate mux option for the RGMII pins which doesn't set SPEED field - Move the configuration of RGMII after they were configured in GPIO modearch/arm/Kconfig +3
-0@@ -411,6 +411,9 @@ config TARGET_GW_VENTANA config TARGET_HUMMINGBOARD bool "Support hummingboard" +config TARGET_KOSAGI_NOVENA + bool "Support Kosagi Novena" +config
TARGET_TQMA6arch/arm/Kconfig +1
-0bool "TQ Systems TQMa6 board"@@ -637,6 +640,7 @@ source "board/imx31_phycore/Kconfig" source "board/isee/igep0033/Kconfig" source "board/jornada/Kconfig" source "board/karo/tx25/Kconfig" +source "board/kosagi/novena/Kconfig"source "board/logicpd/imx27lite/Kconfig"
source "board/logicpd/imx31_litekit/Kconfig"
source "board/mpl/vcma9/Kconfig"board/kosagi/novena/Kconfig new file +0
-0board/kosagi/novena/Kconfig line 5
Quoted 5 lines
board/kosagi/novena/Kconfig new file +5
-0@@ -0,0 +1,23 @@ +if TARGET_KOSAGI_NOVENA + +config SYS_CPU + string + default "armv7"
Quoted 1 line
According to Masahiro, "strings" is not required and can be dropped.
Dropped, thanks!