mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/7] sata-imx: i.MX53, use the internal 120MHz clock by default
@ 2014-02-08 14:16 Eric Bénard
  2014-02-08 14:16 ` [PATCH 2/7] ARM: i.MX53: Add sata to devicetree Eric Bénard
                   ` (5 more replies)
  0 siblings, 6 replies; 34+ messages in thread
From: Eric Bénard @ 2014-02-08 14:16 UTC (permalink / raw)
  To: barebox

this allows SATA to work on i.MX53 QSB-R :
barebox@Freescale i.MX53 Quick Start-R Board:/ ata0.probe=1
imx-sata 10000000.sata: port 0: SATA link ok
imx-sata 10000000.sata: port 0: Spinning up device...
imx-sata 10000000.sata: port 0: ok.
ata0: registered /dev/ata0

before this fix the log was :
barebox@Freescale i.MX53 Quick Start-R Board:/ ata0.probe=1
imx-sata 10000000.sata: port 0: SATA link timeout
set parameter: Connection timed out

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 drivers/ata/sata-imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ata/sata-imx.c b/drivers/ata/sata-imx.c
index b7bd110..450cf4f 100644
--- a/drivers/ata/sata-imx.c
+++ b/drivers/ata/sata-imx.c
@@ -59,7 +59,7 @@ static int imx53_sata_init(struct imx_ahci *imx_ahci)
 	 */
 	val = readl(base + 0x180c);
 	val &= (0x3 << 1);
-	val |= (0x1 << 1);
+	val |= (0x2 << 1);
 	writel(val, base + 0x180c);
 
 	return 0;
-- 
1.8.3.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 2/7] ARM: i.MX53: Add sata to devicetree
  2014-02-08 14:16 [PATCH 1/7] sata-imx: i.MX53, use the internal 120MHz clock by default Eric Bénard
@ 2014-02-08 14:16 ` Eric Bénard
  2014-02-08 14:26   ` Alexander Shiyan
  2014-02-08 14:16 ` [PATCH 3/7] ARM: mx53-qsrb: fix USB Eric Bénard
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 34+ messages in thread
From: Eric Bénard @ 2014-02-08 14:16 UTC (permalink / raw)
  To: barebox

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 arch/arm/dts/imx53.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/dts/imx53.dtsi b/arch/arm/dts/imx53.dtsi
index 678547c..91659b8 100644
--- a/arch/arm/dts/imx53.dtsi
+++ b/arch/arm/dts/imx53.dtsi
@@ -75,6 +75,15 @@
 		interrupt-parent = <&tzic>;
 		ranges;
 
+		sata: sata@10000000 {
+			compatible = "fsl,imx53-ahci";
+			reg = <0x10000000 0x1000>;
+			interrupts = <28>;
+			clocks = <&clks 173>, <&clks 5>, <&clks 188>;
+			clock-names = "sata", "ahb", "per";
+			status = "disabled";
+		};
+
 		ipu: ipu@18000000 {
 			#crtc-cells = <1>;
 			compatible = "fsl,imx53-ipu";
-- 
1.8.3.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 3/7] ARM: mx53-qsrb: fix USB
  2014-02-08 14:16 [PATCH 1/7] sata-imx: i.MX53, use the internal 120MHz clock by default Eric Bénard
  2014-02-08 14:16 ` [PATCH 2/7] ARM: i.MX53: Add sata to devicetree Eric Bénard
@ 2014-02-08 14:16 ` Eric Bénard
  2014-02-08 14:16 ` [PATCH 4/7] ARM: mx53-qsrb: enable USB host Eric Bénard
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 34+ messages in thread
From: Eric Bénard @ 2014-02-08 14:16 UTC (permalink / raw)
  To: barebox

- configure the MC34708 properly so that USB can work
(the sequence is taken from u-boot)
- add the required defines to the mc13xxx include file

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 arch/arm/boards/freescale-mx53-qsb/board.c | 45 ++++++++++++++++++++++++++++++
 include/mfd/mc13xxx.h                      | 11 ++++++++
 2 files changed, 56 insertions(+)

diff --git a/arch/arm/boards/freescale-mx53-qsb/board.c b/arch/arm/boards/freescale-mx53-qsb/board.c
index 69036da..74826e4 100644
--- a/arch/arm/boards/freescale-mx53-qsb/board.c
+++ b/arch/arm/boards/freescale-mx53-qsb/board.c
@@ -93,11 +93,56 @@ static int loco_late_init(void)
 
 	mc34708 = mc13xxx_get();
 	if (mc34708) {
+		unsigned int val;
+		int ret;
 		/* get the board revision from fuse */
 		rev = readl(MX53_IIM_BASE_ADDR + 0x878);
 		set_board_rev(rev);
 		printf("MCIMX53-START-R board 1.0 rev %c\n", (rev == 1) ? 'A' : 'B' );
 		armlinux_set_revision(loco_system_rev);
+		/* Set VDDGP to 1.25V for 1GHz on SW1 */
+		mc13xxx_reg_read(mc34708, MC13892_REG_SW_0, &val);
+		val = (val & ~SWx_VOLT_MASK_MC34708) | SWx_1_250V_MC34708;
+		ret = mc13xxx_reg_write(mc34708, MC13892_REG_SW_0, val);
+		if (ret) {
+			printf("Writing to REG_SW_0 failed: %d\n", ret);
+			return ret;
+		}
+
+		/* Set VCC as 1.30V on SW2 */
+		mc13xxx_reg_read(mc34708, MC13892_REG_SW_1, &val);
+		val = (val & ~SWx_VOLT_MASK_MC34708) | SWx_1_300V_MC34708;
+		ret = mc13xxx_reg_write(mc34708, MC13892_REG_SW_1, val);
+		if (ret) {
+			printf("Writing to REG_SW_1 failed: %d\n", ret);
+			return ret;
+		}
+
+		/* Set global reset timer to 4s */
+		mc13xxx_reg_read(mc34708, MC13892_REG_POWER_CTL2, &val);
+		val = (val & ~TIMER_MASK_MC34708) | TIMER_4S_MC34708;
+		ret = mc13xxx_reg_write(mc34708, MC13892_REG_POWER_CTL2, val);
+		if (ret) {
+			printf("Writing to REG_POWER_CTL2 failed: %d\n", ret);
+			return ret;
+		}
+
+		/* Set VUSBSEL and VUSBEN for USB PHY supply*/
+		mc13xxx_reg_read(mc34708, MC13892_REG_MODE_0, &val);
+		val |= (VUSBSEL_MC34708 | VUSBEN_MC34708);
+		ret = mc13xxx_reg_write(mc34708, MC13892_REG_MODE_0, val);
+		if (ret) {
+			printf("Writing to REG_MODE_0 failed: %d\n", ret);
+			return ret;
+		}
+
+		/* Set SWBST to 5V in auto mode */
+		val = SWBST_AUTO;
+		ret = mc13xxx_reg_write(mc34708, SWBST_CTRL, val);
+		if (ret) {
+			printf("Writing to SWBST_CTRL failed: %d\n", ret);
+			return ret;
+		}
 	} else {
 		/* so we have a DA9053 based board */
 		printf("MCIMX53-START board 1.0\n");
diff --git a/include/mfd/mc13xxx.h b/include/mfd/mc13xxx.h
index cba8589..1946b1a 100644
--- a/include/mfd/mc13xxx.h
+++ b/include/mfd/mc13xxx.h
@@ -152,6 +152,17 @@
 #define MC13783_SW1B_SOFTSTART		(1 << 17)
 #define MC13783_SW_PLL_FACTOR(x)	(((x) - 28) << 19)
 
+/* MC34708 Definitions */
+#define SWx_VOLT_MASK_MC34708	0x3F
+#define SWx_1_250V_MC34708	0x30
+#define SWx_1_300V_MC34708	0x34
+#define TIMER_MASK_MC34708	0x300
+#define TIMER_4S_MC34708	0x100
+#define VUSBSEL_MC34708		(1 << 2)
+#define VUSBEN_MC34708		(1 << 3)
+#define SWBST_CTRL		31
+#define SWBST_AUTO		0x8
+
 struct mc13xxx;
 
 #ifdef CONFIG_MFD_MC13XXX
-- 
1.8.3.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 4/7] ARM: mx53-qsrb: enable USB host
  2014-02-08 14:16 [PATCH 1/7] sata-imx: i.MX53, use the internal 120MHz clock by default Eric Bénard
  2014-02-08 14:16 ` [PATCH 2/7] ARM: i.MX53: Add sata to devicetree Eric Bénard
  2014-02-08 14:16 ` [PATCH 3/7] ARM: mx53-qsrb: fix USB Eric Bénard
@ 2014-02-08 14:16 ` Eric Bénard
  2014-02-08 14:16 ` [PATCH 5/7] ARM: mx53-qsrb: enable USB OTG in host mode Eric Bénard
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 34+ messages in thread
From: Eric Bénard @ 2014-02-08 14:16 UTC (permalink / raw)
  To: barebox

- declare the rigth mux for the GPIO used to enable the USB's 5V
- enable USB host controller

tested on i.MX53 START-R :
barebox@Freescale i.MX53 Quick Start-R Board:/ usb -f
USB: scanning bus for devices...
Bus 001 Device 001: ID 0000:0000 EHCI Host Controller
Using index 0 for the new disk
Bus 002 Device 003: ID 0951:1654 DT R500
Bus 002 Device 002: ID 0000:0000 EHCI Host Controller
3 USB Device(s) found

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 arch/arm/dts/imx53-qsb-common.dtsi | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/imx53-qsb-common.dtsi b/arch/arm/dts/imx53-qsb-common.dtsi
index f2f912b..4ae1f49 100644
--- a/arch/arm/dts/imx53-qsb-common.dtsi
+++ b/arch/arm/dts/imx53-qsb-common.dtsi
@@ -158,6 +158,7 @@
 				MX53_PAD_EIM_DA13__GPIO3_13       0x80000000
 				MX53_PAD_PATA_DA_0__GPIO7_6       0x80000000
 				MX53_PAD_GPIO_16__GPIO7_11        0x80000000
+				MX53_PAD_PATA_DA_2__GPIO7_8       0x80000000
 			>;
 		};
 
@@ -216,9 +217,12 @@
 };
 
 &usbh1 {
-       status = "okay";
+	phy_type = "utmi";
+	dr_mode = "host";
+	status = "okay";
 };
 
 &usbotg {
        status = "okay";
 };
+
-- 
1.8.3.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 5/7] ARM: mx53-qsrb: enable USB OTG in host mode
  2014-02-08 14:16 [PATCH 1/7] sata-imx: i.MX53, use the internal 120MHz clock by default Eric Bénard
                   ` (2 preceding siblings ...)
  2014-02-08 14:16 ` [PATCH 4/7] ARM: mx53-qsrb: enable USB host Eric Bénard
@ 2014-02-08 14:16 ` Eric Bénard
  2014-02-10  8:16   ` Sascha Hauer
  2014-02-08 14:16 ` [PATCH 6/7] ARM: mx53-qsrb: enable sata Eric Bénard
  2014-02-08 14:16 ` [PATCH 7/7] ARM: mx53-qsb: update defconfig Eric Bénard
  5 siblings, 1 reply; 34+ messages in thread
From: Eric Bénard @ 2014-02-08 14:16 UTC (permalink / raw)
  To: barebox

tested on i.MX53 START-R :
barebox@Freescale i.MX53 Quick Start-R Board:/ usb -f
USB: scanning bus for devices...
Using index 0 for the new disk
Bus 001 Device 002: ID 0951:1654 DT R500
Bus 001 Device 001: ID 0000:0000 EHCI Host Controller
Bus 002 Device 003: ID 0000:0000 EHCI Host Controller
3 USB Device(s) found

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 arch/arm/dts/imx53-qsb-common.dtsi | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/imx53-qsb-common.dtsi b/arch/arm/dts/imx53-qsb-common.dtsi
index 4ae1f49..012d74c 100644
--- a/arch/arm/dts/imx53-qsb-common.dtsi
+++ b/arch/arm/dts/imx53-qsb-common.dtsi
@@ -223,6 +223,8 @@
 };
 
 &usbotg {
-       status = "okay";
+	phy_type = "utmi";
+	dr_mode = "host";
+	status = "okay";
 };
 
-- 
1.8.3.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 6/7] ARM: mx53-qsrb: enable sata
  2014-02-08 14:16 [PATCH 1/7] sata-imx: i.MX53, use the internal 120MHz clock by default Eric Bénard
                   ` (3 preceding siblings ...)
  2014-02-08 14:16 ` [PATCH 5/7] ARM: mx53-qsrb: enable USB OTG in host mode Eric Bénard
@ 2014-02-08 14:16 ` Eric Bénard
  2014-02-08 14:16 ` [PATCH 7/7] ARM: mx53-qsb: update defconfig Eric Bénard
  5 siblings, 0 replies; 34+ messages in thread
From: Eric Bénard @ 2014-02-08 14:16 UTC (permalink / raw)
  To: barebox

tested on i.MX53 START-R :
barebox@Freescale i.MX53 Quick Start-R Board:/ ata0.probe=1
imx-sata 10000000.sata: port 0: SATA link ok
imx-sata 10000000.sata: port 0: Spinning up device...
imx-sata 10000000.sata: port 0: ok.
ata0: registered /dev/ata0

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 arch/arm/dts/imx53-qsb-common.dtsi | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/dts/imx53-qsb-common.dtsi b/arch/arm/dts/imx53-qsb-common.dtsi
index 012d74c..2968b40 100644
--- a/arch/arm/dts/imx53-qsb-common.dtsi
+++ b/arch/arm/dts/imx53-qsb-common.dtsi
@@ -228,3 +228,6 @@
 	status = "okay";
 };
 
+&sata {
+	status = "okay";
+};
-- 
1.8.3.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 7/7] ARM: mx53-qsb: update defconfig
  2014-02-08 14:16 [PATCH 1/7] sata-imx: i.MX53, use the internal 120MHz clock by default Eric Bénard
                   ` (4 preceding siblings ...)
  2014-02-08 14:16 ` [PATCH 6/7] ARM: mx53-qsrb: enable sata Eric Bénard
@ 2014-02-08 14:16 ` Eric Bénard
  5 siblings, 0 replies; 34+ messages in thread
From: Eric Bénard @ 2014-02-08 14:16 UTC (permalink / raw)
  To: barebox

- enable more commands :
    (menu, password, loadb, let, mm, sha*, bootz, of*, memtest)
- enable led and led triggers
- enable sata support
- enable USB chipidea support
- enable USB network drivers
- enable NFS and DNS support
- enable EXT4 support

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 arch/arm/configs/freescale-mx53-qsb_defconfig | 31 +++++++++++++++++++++++++--
 1 file changed, 29 insertions(+), 2 deletions(-)

diff --git a/arch/arm/configs/freescale-mx53-qsb_defconfig b/arch/arm/configs/freescale-mx53-qsb_defconfig
index afe8b72..8365234 100644
--- a/arch/arm/configs/freescale-mx53-qsb_defconfig
+++ b/arch/arm/configs/freescale-mx53-qsb_defconfig
@@ -16,6 +16,7 @@ CONFIG_HUSH_FANCY_PROMPT=y
 CONFIG_CMDLINE_EDITING=y
 CONFIG_AUTO_COMPLETE=y
 CONFIG_MENU=y
+CONFIG_BLSPEC=y
 CONFIG_CONSOLE_ACTIVATE_NONE=y
 CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
 CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/freescale-mx53-qsb/env/"
@@ -25,31 +26,44 @@ CONFIG_CMD_EDIT=y
 CONFIG_CMD_SLEEP=y
 CONFIG_CMD_MSLEEP=y
 CONFIG_CMD_SAVEENV=y
+CONFIG_CMD_LOADENV=y
 CONFIG_CMD_EXPORT=y
 CONFIG_CMD_PRINTENV=y
 CONFIG_CMD_READLINE=y
+CONFIG_CMD_LET=y
 CONFIG_CMD_MENU=y
 CONFIG_CMD_MENU_MANAGEMENT=y
+CONFIG_CMD_PASSWD=y
+CONFIG_PASSWD_MODE_STAR=y
 CONFIG_CMD_TIME=y
 CONFIG_CMD_LN=y
 CONFIG_CMD_TFTP=y
 CONFIG_CMD_FILETYPE=y
 CONFIG_CMD_ECHO_E=y
+CONFIG_CMD_LOADB=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_IOMEM=y
+CONFIG_CMD_MM=y
 CONFIG_CMD_CRC=y
 CONFIG_CMD_CRC_CMP=y
 CONFIG_CMD_MD5SUM=y
+CONFIG_CMD_SHA1SUM=y
+CONFIG_CMD_SHA256SUM=y
+CONFIG_CMD_SHA224SUM=y
 CONFIG_CMD_BOOTM_SHOW_TYPE=y
 CONFIG_CMD_BOOTM_VERBOSE=y
 CONFIG_CMD_BOOTM_INITRD=y
 CONFIG_CMD_BOOTM_OFTREE=y
 CONFIG_CMD_BOOTM_OFTREE_UIMAGE=y
+CONFIG_CMD_BOOTM_AIMAGE=y
 CONFIG_CMD_UIMAGE=y
-# CONFIG_CMD_BOOTU is not set
+CONFIG_CMD_BOOTZ=y
 CONFIG_CMD_RESET=y
 CONFIG_CMD_GO=y
 CONFIG_CMD_OFTREE=y
+CONFIG_CMD_OF_PROPERTY=y
+CONFIG_CMD_OF_NODE=y
+CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_BAREBOX_UPDATE=y
 CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
@@ -64,23 +78,36 @@ CONFIG_CMD_DETECT=y
 CONFIG_CMD_WD=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
+CONFIG_NET_NFS=y
 CONFIG_NET_PING=y
 CONFIG_NET_NETCONSOLE=y
+CONFIG_NET_RESOLV=y
 CONFIG_OFDEVICE=y
 CONFIG_SMSC_PHY=y
 CONFIG_DRIVER_NET_FEC_IMX=y
+CONFIG_NET_USB=y
+CONFIG_NET_USB_ASIX=y
+CONFIG_NET_USB_SMSC95XX=y
 # CONFIG_SPI is not set
 CONFIG_I2C=y
 CONFIG_I2C_IMX=y
-CONFIG_DISK_ATA=y
+CONFIG_DISK_AHCI=y
+CONFIG_DISK_AHCI_IMX=y
 CONFIG_USB=y
+CONFIG_USB_IMX_CHIPIDEA=y
 CONFIG_USB_EHCI=y
+CONFIG_USB_ULPI=y
 CONFIG_USB_STORAGE=y
 CONFIG_MCI=y
 CONFIG_MCI_IMX_ESDHC=y
 CONFIG_MFD_MC13XXX=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_LED_GPIO_OF=y
+CONFIG_LED_TRIGGERS=y
 CONFIG_WATCHDOG=y
 CONFIG_WATCHDOG_IMX=y
+CONFIG_FS_EXT4=y
 CONFIG_FS_TFTP=y
 CONFIG_FS_NFS=y
 CONFIG_FS_FAT=y
-- 
1.8.3.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 2/7] ARM: i.MX53: Add sata to devicetree
  2014-02-08 14:16 ` [PATCH 2/7] ARM: i.MX53: Add sata to devicetree Eric Bénard
@ 2014-02-08 14:26   ` Alexander Shiyan
  2014-02-10  8:33     ` Sascha Hauer
  2014-02-10  9:07     ` [PATCH 2/7] ARM: i.MX53: Add sata to devicetree Sascha Hauer
  0 siblings, 2 replies; 34+ messages in thread
From: Alexander Shiyan @ 2014-02-08 14:26 UTC (permalink / raw)
  To: Eric Bénard, Sascha Hauer; +Cc: barebox

Суббота,  8 февраля 2014, 15:16 +01:00 от Eric Bénard <eric@eukrea.com>:
> Signed-off-by: Eric Bénard <eric@eukrea.com>
> ---
> arch/arm/dts/imx53.dtsi | 9 +++++++++
> 1 file changed, 9 insertions(+)
> 
> diff --git a/arch/arm/dts/imx53.dtsi b/arch/arm/dts/imx53.dtsi
> index 678547c..91659b8 100644
> --- a/arch/arm/dts/imx53.dtsi
> +++ b/arch/arm/dts/imx53.dtsi
> @@ -75,6 +75,15 @@
> interrupt-parent = <&tzic>;
> ranges;
> 
> +		sata: sata@10000000 {
> +			compatible = "fsl,imx53-ahci";
> +			reg = <0x10000000 0x1000>;
> +			interrupts = <28>;
> +			clocks = <&clks 173>, <&clks 5>, <&clks 188>;
> +			clock-names = "sata", "ahb", "per";
> +			status = "disabled";
> +		};

Sascha, we stop changing DTS of the kernel or not?
What is the ultimate solution?

---
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 5/7] ARM: mx53-qsrb: enable USB OTG in host mode
  2014-02-08 14:16 ` [PATCH 5/7] ARM: mx53-qsrb: enable USB OTG in host mode Eric Bénard
@ 2014-02-10  8:16   ` Sascha Hauer
  2014-02-10  8:28     ` Eric Bénard
  0 siblings, 1 reply; 34+ messages in thread
From: Sascha Hauer @ 2014-02-10  8:16 UTC (permalink / raw)
  To: Eric Bénard; +Cc: barebox

On Sat, Feb 08, 2014 at 03:16:10PM +0100, Eric Bénard wrote:
> tested on i.MX53 START-R :
> barebox@Freescale i.MX53 Quick Start-R Board:/ usb -f
> USB: scanning bus for devices...
> Using index 0 for the new disk
> Bus 001 Device 002: ID 0951:1654 DT R500
> Bus 001 Device 001: ID 0000:0000 EHCI Host Controller
> Bus 002 Device 003: ID 0000:0000 EHCI Host Controller
> 3 USB Device(s) found
> 
> Signed-off-by: Eric Bénard <eric@eukrea.com>
> ---
>  arch/arm/dts/imx53-qsb-common.dtsi | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/dts/imx53-qsb-common.dtsi b/arch/arm/dts/imx53-qsb-common.dtsi
> index 4ae1f49..012d74c 100644
> --- a/arch/arm/dts/imx53-qsb-common.dtsi
> +++ b/arch/arm/dts/imx53-qsb-common.dtsi
> @@ -223,6 +223,8 @@
>  };
>  
>  &usbotg {
> -       status = "okay";
> +	phy_type = "utmi";
> +	dr_mode = "host";
> +	status = "okay";
>  };

Do we need a barebox specific option to specify dr_mode? I mean barebox
cannot do otg, so we need to specify dr_mode to host or device, but with
the above change Linux is limited to host mode aswell.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 5/7] ARM: mx53-qsrb: enable USB OTG in host mode
  2014-02-10  8:16   ` Sascha Hauer
@ 2014-02-10  8:28     ` Eric Bénard
  2014-02-10  8:31       ` Sascha Hauer
  0 siblings, 1 reply; 34+ messages in thread
From: Eric Bénard @ 2014-02-10  8:28 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Hi Sascha,

Le Mon, 10 Feb 2014 09:16:17 +0100,
Sascha Hauer <s.hauer@pengutronix.de> a écrit :
> On Sat, Feb 08, 2014 at 03:16:10PM +0100, Eric Bénard wrote:
> >  &usbotg {
> > -       status = "okay";
> > +	phy_type = "utmi";
> > +	dr_mode = "host";
> > +	status = "okay";
> >  };
> 
> Do we need a barebox specific option to specify dr_mode? I mean barebox
> cannot do otg, so we need to specify dr_mode to host or device, but with
> the above change Linux is limited to host mode aswell.
> 
in chipidea-imx.c there is :

	mode = of_usb_get_dr_mode(ci->dev->device_node, NULL);

	switch (mode) {
	case USB_DR_MODE_HOST:
	default:
		ci->mode = IMX_USB_MODE_HOST;
		break;
	case USB_DR_MODE_PERIPHERAL:
		ci->mode = IMX_USB_MODE_DEVICE;
		break;
	}

so we could omit the dr_mode=host as it will default to host.

Eric

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 5/7] ARM: mx53-qsrb: enable USB OTG in host mode
  2014-02-10  8:28     ` Eric Bénard
@ 2014-02-10  8:31       ` Sascha Hauer
  2014-02-10  8:37         ` Eric Bénard
  0 siblings, 1 reply; 34+ messages in thread
From: Sascha Hauer @ 2014-02-10  8:31 UTC (permalink / raw)
  To: Eric Bénard; +Cc: barebox

On Mon, Feb 10, 2014 at 09:28:54AM +0100, Eric Bénard wrote:
> Hi Sascha,
> 
> Le Mon, 10 Feb 2014 09:16:17 +0100,
> Sascha Hauer <s.hauer@pengutronix.de> a écrit :
> > On Sat, Feb 08, 2014 at 03:16:10PM +0100, Eric Bénard wrote:
> > >  &usbotg {
> > > -       status = "okay";
> > > +	phy_type = "utmi";
> > > +	dr_mode = "host";
> > > +	status = "okay";
> > >  };
> > 
> > Do we need a barebox specific option to specify dr_mode? I mean barebox
> > cannot do otg, so we need to specify dr_mode to host or device, but with
> > the above change Linux is limited to host mode aswell.
> > 
> in chipidea-imx.c there is :
> 
> 	mode = of_usb_get_dr_mode(ci->dev->device_node, NULL);
> 
> 	switch (mode) {
> 	case USB_DR_MODE_HOST:
> 	default:
> 		ci->mode = IMX_USB_MODE_HOST;
> 		break;
> 	case USB_DR_MODE_PERIPHERAL:
> 		ci->mode = IMX_USB_MODE_DEVICE;
> 		break;
> 	}
> 
> so we could omit the dr_mode=host as it will default to host.

Then let's do this. The default-to-host beahaviour in barebox may not
be desirable in all cases, but at least we do not propagate this
behaviour to the kernel.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 2/7] ARM: i.MX53: Add sata to devicetree
  2014-02-08 14:26   ` Alexander Shiyan
@ 2014-02-10  8:33     ` Sascha Hauer
  2014-02-10  8:39       ` Eric Bénard
  2014-02-10  8:40       ` Alexander Shiyan
  2014-02-10  9:07     ` [PATCH 2/7] ARM: i.MX53: Add sata to devicetree Sascha Hauer
  1 sibling, 2 replies; 34+ messages in thread
From: Sascha Hauer @ 2014-02-10  8:33 UTC (permalink / raw)
  To: Alexander Shiyan; +Cc: barebox

On Sat, Feb 08, 2014 at 06:26:41PM +0400, Alexander Shiyan wrote:
> Суббота,  8 февраля 2014, 15:16 +01:00 от Eric Bénard <eric@eukrea.com>:
> > Signed-off-by: Eric Bénard <eric@eukrea.com>
> > ---
> > arch/arm/dts/imx53.dtsi | 9 +++++++++
> > 1 file changed, 9 insertions(+)
> > 
> > diff --git a/arch/arm/dts/imx53.dtsi b/arch/arm/dts/imx53.dtsi
> > index 678547c..91659b8 100644
> > --- a/arch/arm/dts/imx53.dtsi
> > +++ b/arch/arm/dts/imx53.dtsi
> > @@ -75,6 +75,15 @@
> > interrupt-parent = <&tzic>;
> > ranges;
> > 
> > +		sata: sata@10000000 {
> > +			compatible = "fsl,imx53-ahci";
> > +			reg = <0x10000000 0x1000>;
> > +			interrupts = <28>;
> > +			clocks = <&clks 173>, <&clks 5>, <&clks 188>;
> > +			clock-names = "sata", "ahb", "per";
> > +			status = "disabled";
> > +		};
> 
> Sascha, we stop changing DTS of the kernel or not?
> What is the ultimate solution?

What do you suggest for the case above? A imx53-bb.dtsi included from
imx53.dtsi? I think disallowing ahci support for barebox if it's not
upstream in Linux is not a good option.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 5/7] ARM: mx53-qsrb: enable USB OTG in host mode
  2014-02-10  8:31       ` Sascha Hauer
@ 2014-02-10  8:37         ` Eric Bénard
  0 siblings, 0 replies; 34+ messages in thread
From: Eric Bénard @ 2014-02-10  8:37 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Le Mon, 10 Feb 2014 09:31:48 +0100,
Sascha Hauer <s.hauer@pengutronix.de> a écrit :

> On Mon, Feb 10, 2014 at 09:28:54AM +0100, Eric Bénard wrote:
> > Hi Sascha,
> > 
> > Le Mon, 10 Feb 2014 09:16:17 +0100,
> > Sascha Hauer <s.hauer@pengutronix.de> a écrit :
> > > On Sat, Feb 08, 2014 at 03:16:10PM +0100, Eric Bénard wrote:
> > > >  &usbotg {
> > > > -       status = "okay";
> > > > +	phy_type = "utmi";
> > > > +	dr_mode = "host";
> > > > +	status = "okay";
> > > >  };
> > > 
> > > Do we need a barebox specific option to specify dr_mode? I mean barebox
> > > cannot do otg, so we need to specify dr_mode to host or device, but with
> > > the above change Linux is limited to host mode aswell.
> > > 
> > in chipidea-imx.c there is :
> > 
> > 	mode = of_usb_get_dr_mode(ci->dev->device_node, NULL);
> > 
> > 	switch (mode) {
> > 	case USB_DR_MODE_HOST:
> > 	default:
> > 		ci->mode = IMX_USB_MODE_HOST;
> > 		break;
> > 	case USB_DR_MODE_PERIPHERAL:
> > 		ci->mode = IMX_USB_MODE_DEVICE;
> > 		break;
> > 	}
> > 
> > so we could omit the dr_mode=host as it will default to host.
> 
> Then let's do this. The default-to-host beahaviour in barebox may not
> be desirable in all cases, but at least we do not propagate this
> behaviour to the kernel.
> 
do you want a v2 or will you remove the line when applying ?

Eric

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 2/7] ARM: i.MX53: Add sata to devicetree
  2014-02-10  8:33     ` Sascha Hauer
@ 2014-02-10  8:39       ` Eric Bénard
  2014-02-10  8:40       ` Alexander Shiyan
  1 sibling, 0 replies; 34+ messages in thread
From: Eric Bénard @ 2014-02-10  8:39 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Le Mon, 10 Feb 2014 09:33:58 +0100,
Sascha Hauer <s.hauer@pengutronix.de> a écrit :

> On Sat, Feb 08, 2014 at 06:26:41PM +0400, Alexander Shiyan wrote:
> > Суббота,  8 февраля 2014, 15:16 +01:00 от Eric Bénard <eric@eukrea.com>:
> > > Signed-off-by: Eric Bénard <eric@eukrea.com>
> > > ---
> > > arch/arm/dts/imx53.dtsi | 9 +++++++++
> > > 1 file changed, 9 insertions(+)
> > > 
> > > diff --git a/arch/arm/dts/imx53.dtsi b/arch/arm/dts/imx53.dtsi
> > > index 678547c..91659b8 100644
> > > --- a/arch/arm/dts/imx53.dtsi
> > > +++ b/arch/arm/dts/imx53.dtsi
> > > @@ -75,6 +75,15 @@
> > > interrupt-parent = <&tzic>;
> > > ranges;
> > > 
> > > +		sata: sata@10000000 {
> > > +			compatible = "fsl,imx53-ahci";
> > > +			reg = <0x10000000 0x1000>;
> > > +			interrupts = <28>;
> > > +			clocks = <&clks 173>, <&clks 5>, <&clks 188>;
> > > +			clock-names = "sata", "ahb", "per";
> > > +			status = "disabled";
> > > +		};
> > 
> > Sascha, we stop changing DTS of the kernel or not?
> > What is the ultimate solution?
> 
> What do you suggest for the case above? A imx53-bb.dtsi included from
> imx53.dtsi? I think disallowing ahci support for barebox if it's not
> upstream in Linux is not a good option.
> 
it's in linux-next :
http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/arch/arm/boot/dts/imx53.dtsi#n94

Eric

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 2/7] ARM: i.MX53: Add sata to devicetree
  2014-02-10  8:33     ` Sascha Hauer
  2014-02-10  8:39       ` Eric Bénard
@ 2014-02-10  8:40       ` Alexander Shiyan
  2014-02-10  8:48         ` Eric Bénard
  1 sibling, 1 reply; 34+ messages in thread
From: Alexander Shiyan @ 2014-02-10  8:40 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Понедельник, 10 февраля 2014, 9:33 +01:00 от Sascha Hauer <s.hauer@pengutronix.de>:
> On Sat, Feb 08, 2014 at 06:26:41PM +0400, Alexander Shiyan wrote:
> > Суббота,  8 февраля 2014, 15:16 +01:00 от Eric Bénard <eric@eukrea.com>:
> > > Signed-off-by: Eric Bénard <eric@eukrea.com>
> > > ---
> > > arch/arm/dts/imx53.dtsi | 9 +++++++++
> > > 1 file changed, 9 insertions(+)
> > > 
> > > diff --git a/arch/arm/dts/imx53.dtsi b/arch/arm/dts/imx53.dtsi
> > > index 678547c..91659b8 100644
> > > --- a/arch/arm/dts/imx53.dtsi
> > > +++ b/arch/arm/dts/imx53.dtsi
> > > @@ -75,6 +75,15 @@
> > > interrupt-parent = <&tzic>;
> > > ranges;
> > > 
> > > +		sata: sata@10000000 {
> > > +			compatible = "fsl,imx53-ahci";
> > > +			reg = <0x10000000 0x1000>;
> > > +			interrupts = <28>;
> > > +			clocks = <&clks 173>, <&clks 5>, <&clks 188>;
> > > +			clock-names = "sata", "ahb", "per";
> > > +			status = "disabled";
> > > +		};
> > 
> > Sascha, we stop changing DTS of the kernel or not?
> > What is the ultimate solution?
> 
> What do you suggest for the case above? A imx53-bb.dtsi included from
> imx53.dtsi? I think disallowing ahci support for barebox if it's not
> upstream in Linux is not a good option.

I suggest just sync imx53.dtsi from the linux-next, as a result we will have
non-modified version of kernel templates.
Change as above, makes imx53.dtsi different for kernel and barebox.
This is part of sata node from the kernel:
		sata: sata@10000000 {
			compatible = "fsl,imx53-ahci";
			reg = <0x10000000 0x1000>;
			interrupts = <28>;
			clocks = <&clks IMX5_CLK_SATA_GATE>,
				 <&clks IMX5_CLK_SATA_REF>,
				 <&clks IMX5_CLK_AHB>;
			clock-names = "sata_gate", "sata_ref", "ahb";
			status = "disabled";
		};

---
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 2/7] ARM: i.MX53: Add sata to devicetree
  2014-02-10  8:40       ` Alexander Shiyan
@ 2014-02-10  8:48         ` Eric Bénard
  2014-02-10  8:52           ` Sascha Hauer
  0 siblings, 1 reply; 34+ messages in thread
From: Eric Bénard @ 2014-02-10  8:48 UTC (permalink / raw)
  To: Alexander Shiyan; +Cc: barebox

Le Mon, 10 Feb 2014 12:40:44 +0400,
Alexander Shiyan <shc_work@mail.ru> a écrit :

> Понедельник, 10 февраля 2014, 9:33 +01:00 от Sascha Hauer <s.hauer@pengutronix.de>:
> > On Sat, Feb 08, 2014 at 06:26:41PM +0400, Alexander Shiyan wrote:
> > > Суббота,  8 февраля 2014, 15:16 +01:00 от Eric Bénard <eric@eukrea.com>:
> > > > Signed-off-by: Eric Bénard <eric@eukrea.com>
> > > > ---
> > > > arch/arm/dts/imx53.dtsi | 9 +++++++++
> > > > 1 file changed, 9 insertions(+)
> > > > 
> > > > diff --git a/arch/arm/dts/imx53.dtsi b/arch/arm/dts/imx53.dtsi
> > > > index 678547c..91659b8 100644
> > > > --- a/arch/arm/dts/imx53.dtsi
> > > > +++ b/arch/arm/dts/imx53.dtsi
> > > > @@ -75,6 +75,15 @@
> > > > interrupt-parent = <&tzic>;
> > > > ranges;
> > > > 
> > > > +		sata: sata@10000000 {
> > > > +			compatible = "fsl,imx53-ahci";
> > > > +			reg = <0x10000000 0x1000>;
> > > > +			interrupts = <28>;
> > > > +			clocks = <&clks 173>, <&clks 5>, <&clks 188>;
> > > > +			clock-names = "sata", "ahb", "per";
> > > > +			status = "disabled";
> > > > +		};
> > > 
> > > Sascha, we stop changing DTS of the kernel or not?
> > > What is the ultimate solution?
> > 
> > What do you suggest for the case above? A imx53-bb.dtsi included from
> > imx53.dtsi? I think disallowing ahci support for barebox if it's not
> > upstream in Linux is not a good option.
> 
> I suggest just sync imx53.dtsi from the linux-next, as a result we will have
> non-modified version of kernel templates.
> Change as above, makes imx53.dtsi different for kernel and barebox.
> This is part of sata node from the kernel:
> 		sata: sata@10000000 {
> 			compatible = "fsl,imx53-ahci";
> 			reg = <0x10000000 0x1000>;
> 			interrupts = <28>;
> 			clocks = <&clks IMX5_CLK_SATA_GATE>,
> 				 <&clks IMX5_CLK_SATA_REF>,
> 				 <&clks IMX5_CLK_AHB>;
> 			clock-names = "sata_gate", "sata_ref", "ahb";
> 			status = "disabled";
> 		};
> 
that's possible, I don't know why the clock are changed in barebox vs
linux and don't know if that's needed (I got inspiration from other
nodes)

Eric

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 2/7] ARM: i.MX53: Add sata to devicetree
  2014-02-10  8:48         ` Eric Bénard
@ 2014-02-10  8:52           ` Sascha Hauer
  2014-02-10  8:54             ` Eric Bénard
  0 siblings, 1 reply; 34+ messages in thread
From: Sascha Hauer @ 2014-02-10  8:52 UTC (permalink / raw)
  To: Eric Bénard; +Cc: barebox

On Mon, Feb 10, 2014 at 09:48:19AM +0100, Eric Bénard wrote:
> Le Mon, 10 Feb 2014 12:40:44 +0400,
> Alexander Shiyan <shc_work@mail.ru> a écrit :
> 
> > Понедельник, 10 февраля 2014, 9:33 +01:00 от Sascha Hauer <s.hauer@pengutronix.de>:
> > > On Sat, Feb 08, 2014 at 06:26:41PM +0400, Alexander Shiyan wrote:
> > > > Суббота,  8 февраля 2014, 15:16 +01:00 от Eric Bénard <eric@eukrea.com>:
> > > > > Signed-off-by: Eric Bénard <eric@eukrea.com>
> > > > > ---
> > > > > arch/arm/dts/imx53.dtsi | 9 +++++++++
> > > > > 1 file changed, 9 insertions(+)
> > > > > 
> > > > > diff --git a/arch/arm/dts/imx53.dtsi b/arch/arm/dts/imx53.dtsi
> > > > > index 678547c..91659b8 100644
> > > > > --- a/arch/arm/dts/imx53.dtsi
> > > > > +++ b/arch/arm/dts/imx53.dtsi
> > > > > @@ -75,6 +75,15 @@
> > > > > interrupt-parent = <&tzic>;
> > > > > ranges;
> > > > > 
> > > > > +		sata: sata@10000000 {
> > > > > +			compatible = "fsl,imx53-ahci";
> > > > > +			reg = <0x10000000 0x1000>;
> > > > > +			interrupts = <28>;
> > > > > +			clocks = <&clks 173>, <&clks 5>, <&clks 188>;
> > > > > +			clock-names = "sata", "ahb", "per";
> > > > > +			status = "disabled";
> > > > > +		};
> > > > 
> > > > Sascha, we stop changing DTS of the kernel or not?
> > > > What is the ultimate solution?
> > > 
> > > What do you suggest for the case above? A imx53-bb.dtsi included from
> > > imx53.dtsi? I think disallowing ahci support for barebox if it's not
> > > upstream in Linux is not a good option.
> > 
> > I suggest just sync imx53.dtsi from the linux-next, as a result we will have
> > non-modified version of kernel templates.
> > Change as above, makes imx53.dtsi different for kernel and barebox.
> > This is part of sata node from the kernel:
> > 		sata: sata@10000000 {
> > 			compatible = "fsl,imx53-ahci";
> > 			reg = <0x10000000 0x1000>;
> > 			interrupts = <28>;
> > 			clocks = <&clks IMX5_CLK_SATA_GATE>,
> > 				 <&clks IMX5_CLK_SATA_REF>,
> > 				 <&clks IMX5_CLK_AHB>;
> > 			clock-names = "sata_gate", "sata_ref", "ahb";
> > 			status = "disabled";
> > 		};
> > 
> that's possible, I don't know why the clock are changed in barebox vs
> linux and don't know if that's needed (I got inspiration from other
> nodes)

They are identical, it's only that Alexander introduced defines for the
clocks in Linux whereas in barebox we have the older versions with
plain numbers.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 2/7] ARM: i.MX53: Add sata to devicetree
  2014-02-10  8:52           ` Sascha Hauer
@ 2014-02-10  8:54             ` Eric Bénard
  2014-02-10  9:03               ` Sascha Hauer
  0 siblings, 1 reply; 34+ messages in thread
From: Eric Bénard @ 2014-02-10  8:54 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Le Mon, 10 Feb 2014 09:52:35 +0100,
Sascha Hauer <s.hauer@pengutronix.de> a écrit :

> On Mon, Feb 10, 2014 at 09:48:19AM +0100, Eric Bénard wrote:
> > Le Mon, 10 Feb 2014 12:40:44 +0400,
> > Alexander Shiyan <shc_work@mail.ru> a écrit :
> > 
> > > Понедельник, 10 февраля 2014, 9:33 +01:00 от Sascha Hauer <s.hauer@pengutronix.de>:
> > > > On Sat, Feb 08, 2014 at 06:26:41PM +0400, Alexander Shiyan wrote:
> > > > > Суббота,  8 февраля 2014, 15:16 +01:00 от Eric Bénard <eric@eukrea.com>:
> > > > > > Signed-off-by: Eric Bénard <eric@eukrea.com>
> > > > > > ---
> > > > > > arch/arm/dts/imx53.dtsi | 9 +++++++++
> > > > > > 1 file changed, 9 insertions(+)
> > > > > > 
> > > > > > diff --git a/arch/arm/dts/imx53.dtsi b/arch/arm/dts/imx53.dtsi
> > > > > > index 678547c..91659b8 100644
> > > > > > --- a/arch/arm/dts/imx53.dtsi
> > > > > > +++ b/arch/arm/dts/imx53.dtsi
> > > > > > @@ -75,6 +75,15 @@
> > > > > > interrupt-parent = <&tzic>;
> > > > > > ranges;
> > > > > > 
> > > > > > +		sata: sata@10000000 {
> > > > > > +			compatible = "fsl,imx53-ahci";
> > > > > > +			reg = <0x10000000 0x1000>;
> > > > > > +			interrupts = <28>;
> > > > > > +			clocks = <&clks 173>, <&clks 5>, <&clks 188>;
> > > > > > +			clock-names = "sata", "ahb", "per";
> > > > > > +			status = "disabled";
> > > > > > +		};
> > > > > 
> > > > > Sascha, we stop changing DTS of the kernel or not?
> > > > > What is the ultimate solution?
> > > > 
> > > > What do you suggest for the case above? A imx53-bb.dtsi included from
> > > > imx53.dtsi? I think disallowing ahci support for barebox if it's not
> > > > upstream in Linux is not a good option.
> > > 
> > > I suggest just sync imx53.dtsi from the linux-next, as a result we will have
> > > non-modified version of kernel templates.
> > > Change as above, makes imx53.dtsi different for kernel and barebox.
> > > This is part of sata node from the kernel:
> > > 		sata: sata@10000000 {
> > > 			compatible = "fsl,imx53-ahci";
> > > 			reg = <0x10000000 0x1000>;
> > > 			interrupts = <28>;
> > > 			clocks = <&clks IMX5_CLK_SATA_GATE>,
> > > 				 <&clks IMX5_CLK_SATA_REF>,
> > > 				 <&clks IMX5_CLK_AHB>;
> > > 			clock-names = "sata_gate", "sata_ref", "ahb";
> > > 			status = "disabled";
> > > 		};
> > > 
> > that's possible, I don't know why the clock are changed in barebox vs
> > linux and don't know if that's needed (I got inspiration from other
> > nodes)
> 
> They are identical, it's only that Alexander introduced defines for the
> clocks in Linux whereas in barebox we have the older versions with
> plain numbers.
> 
clock-names are also changed as well as the order (taken from other
nodes).
if that's not a problem in barebox, we can use linux-next's dtsi.

Eric (very little background with dts ATM)

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 2/7] ARM: i.MX53: Add sata to devicetree
  2014-02-10  8:54             ` Eric Bénard
@ 2014-02-10  9:03               ` Sascha Hauer
  2014-02-10  9:11                 ` Sascha Hauer
  0 siblings, 1 reply; 34+ messages in thread
From: Sascha Hauer @ 2014-02-10  9:03 UTC (permalink / raw)
  To: Eric Bénard; +Cc: barebox

On Mon, Feb 10, 2014 at 09:54:18AM +0100, Eric Bénard wrote:
> Le Mon, 10 Feb 2014 09:52:35 +0100,
> Sascha Hauer <s.hauer@pengutronix.de> a écrit :
> 
> > On Mon, Feb 10, 2014 at 09:48:19AM +0100, Eric Bénard wrote:
> > > Le Mon, 10 Feb 2014 12:40:44 +0400,
> > > Alexander Shiyan <shc_work@mail.ru> a écrit :
> > > 
> > > > Понедельник, 10 февраля 2014, 9:33 +01:00 от Sascha Hauer <s.hauer@pengutronix.de>:
> > > > > On Sat, Feb 08, 2014 at 06:26:41PM +0400, Alexander Shiyan wrote:
> > > > > > Суббота,  8 февраля 2014, 15:16 +01:00 от Eric Bénard <eric@eukrea.com>:
> > > > > > > Signed-off-by: Eric Bénard <eric@eukrea.com>
> > > > > > > ---
> > > > > > > arch/arm/dts/imx53.dtsi | 9 +++++++++
> > > > > > > 1 file changed, 9 insertions(+)
> > > > > > > 
> > > > > > > diff --git a/arch/arm/dts/imx53.dtsi b/arch/arm/dts/imx53.dtsi
> > > > > > > index 678547c..91659b8 100644
> > > > > > > --- a/arch/arm/dts/imx53.dtsi
> > > > > > > +++ b/arch/arm/dts/imx53.dtsi
> > > > > > > @@ -75,6 +75,15 @@
> > > > > > > interrupt-parent = <&tzic>;
> > > > > > > ranges;
> > > > > > > 
> > > > > > > +		sata: sata@10000000 {
> > > > > > > +			compatible = "fsl,imx53-ahci";
> > > > > > > +			reg = <0x10000000 0x1000>;
> > > > > > > +			interrupts = <28>;
> > > > > > > +			clocks = <&clks 173>, <&clks 5>, <&clks 188>;
> > > > > > > +			clock-names = "sata", "ahb", "per";
> > > > > > > +			status = "disabled";
> > > > > > > +		};
> > > > > > 
> > > > > > Sascha, we stop changing DTS of the kernel or not?
> > > > > > What is the ultimate solution?
> > > > > 
> > > > > What do you suggest for the case above? A imx53-bb.dtsi included from
> > > > > imx53.dtsi? I think disallowing ahci support for barebox if it's not
> > > > > upstream in Linux is not a good option.
> > > > 
> > > > I suggest just sync imx53.dtsi from the linux-next, as a result we will have
> > > > non-modified version of kernel templates.
> > > > Change as above, makes imx53.dtsi different for kernel and barebox.
> > > > This is part of sata node from the kernel:
> > > > 		sata: sata@10000000 {
> > > > 			compatible = "fsl,imx53-ahci";
> > > > 			reg = <0x10000000 0x1000>;
> > > > 			interrupts = <28>;
> > > > 			clocks = <&clks IMX5_CLK_SATA_GATE>,
> > > > 				 <&clks IMX5_CLK_SATA_REF>,
> > > > 				 <&clks IMX5_CLK_AHB>;
> > > > 			clock-names = "sata_gate", "sata_ref", "ahb";
> > > > 			status = "disabled";
> > > > 		};
> > > > 
> > > that's possible, I don't know why the clock are changed in barebox vs
> > > linux and don't know if that's needed (I got inspiration from other
> > > nodes)
> > 
> > They are identical, it's only that Alexander introduced defines for the
> > clocks in Linux whereas in barebox we have the older versions with
> > plain numbers.
> > 
> clock-names are also changed as well as the order (taken from other
> nodes).

Oh, you are right. The order doesn't matter, but the names should be
identical. We should use the same names in barebox as in the kernel, be
it with defines or with numbers.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 2/7] ARM: i.MX53: Add sata to devicetree
  2014-02-08 14:26   ` Alexander Shiyan
  2014-02-10  8:33     ` Sascha Hauer
@ 2014-02-10  9:07     ` Sascha Hauer
  2014-02-10  9:15       ` Sascha Hauer
  1 sibling, 1 reply; 34+ messages in thread
From: Sascha Hauer @ 2014-02-10  9:07 UTC (permalink / raw)
  To: Alexander Shiyan; +Cc: barebox

On Sat, Feb 08, 2014 at 06:26:41PM +0400, Alexander Shiyan wrote:
> Суббота,  8 февраля 2014, 15:16 +01:00 от Eric Bénard <eric@eukrea.com>:
> > Signed-off-by: Eric Bénard <eric@eukrea.com>
> > ---
> > arch/arm/dts/imx53.dtsi | 9 +++++++++
> > 1 file changed, 9 insertions(+)
> > 
> > diff --git a/arch/arm/dts/imx53.dtsi b/arch/arm/dts/imx53.dtsi
> > index 678547c..91659b8 100644
> > --- a/arch/arm/dts/imx53.dtsi
> > +++ b/arch/arm/dts/imx53.dtsi
> > @@ -75,6 +75,15 @@
> > interrupt-parent = <&tzic>;
> > ranges;
> > 
> > +		sata: sata@10000000 {
> > +			compatible = "fsl,imx53-ahci";
> > +			reg = <0x10000000 0x1000>;
> > +			interrupts = <28>;
> > +			clocks = <&clks 173>, <&clks 5>, <&clks 188>;
> > +			clock-names = "sata", "ahb", "per";
> > +			status = "disabled";
> > +		};
> 
> Sascha, we stop changing DTS of the kernel or not?
> What is the ultimate solution?

I don't want to give out the rule "Only use unmodified dts in barebox"
and then use dts files from Linux-next. If we only want to use
unmodified dts files we have to use the ones from Linux mainline.
Otherwise we are doomed when a pull request doesn't make it in the
Kernel and then the dts files are changed significantly before the
next merge window, as just happens with Shawns dts changes for 3.14.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 2/7] ARM: i.MX53: Add sata to devicetree
  2014-02-10  9:03               ` Sascha Hauer
@ 2014-02-10  9:11                 ` Sascha Hauer
  2014-03-07 10:39                   ` [PATCH v2 1/7] sata-imx: i.MX53, use the internal 120MHz clock by default Eric Bénard
  0 siblings, 1 reply; 34+ messages in thread
From: Sascha Hauer @ 2014-02-10  9:11 UTC (permalink / raw)
  To: Eric Bénard; +Cc: barebox

On Mon, Feb 10, 2014 at 10:03:47AM +0100, Sascha Hauer wrote:
> > > > > I suggest just sync imx53.dtsi from the linux-next, as a result we will have
> > > > > non-modified version of kernel templates.
> > > > > Change as above, makes imx53.dtsi different for kernel and barebox.
> > > > > This is part of sata node from the kernel:
> > > > > 		sata: sata@10000000 {
> > > > > 			compatible = "fsl,imx53-ahci";
> > > > > 			reg = <0x10000000 0x1000>;
> > > > > 			interrupts = <28>;
> > > > > 			clocks = <&clks IMX5_CLK_SATA_GATE>,
> > > > > 				 <&clks IMX5_CLK_SATA_REF>,
> > > > > 				 <&clks IMX5_CLK_AHB>;
> > > > > 			clock-names = "sata_gate", "sata_ref", "ahb";
> > > > > 			status = "disabled";
> > > > > 		};
> > > > > 
> > > > that's possible, I don't know why the clock are changed in barebox vs
> > > > linux and don't know if that's needed (I got inspiration from other
> > > > nodes)
> > > 
> > > They are identical, it's only that Alexander introduced defines for the
> > > clocks in Linux whereas in barebox we have the older versions with
> > > plain numbers.
> > > 
> > clock-names are also changed as well as the order (taken from other
> > nodes).
> 
> Oh, you are right. The order doesn't matter, but the names should be
> identical. We should use the same names in barebox as in the kernel, be
> it with defines or with numbers.

So, Eric, to sort that out for now:

- Please update the SATA entry to be compatible with the kernel, but do
  not use the Linux-next dts. This means use plain numbers, but the
  correct clock names.
- Remove the dr_mode = "host" line

With these changes this series should be fine for merging.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 2/7] ARM: i.MX53: Add sata to devicetree
  2014-02-10  9:07     ` [PATCH 2/7] ARM: i.MX53: Add sata to devicetree Sascha Hauer
@ 2014-02-10  9:15       ` Sascha Hauer
  2014-02-10  9:22         ` Alexander Shiyan
  0 siblings, 1 reply; 34+ messages in thread
From: Sascha Hauer @ 2014-02-10  9:15 UTC (permalink / raw)
  To: Alexander Shiyan; +Cc: barebox

On Mon, Feb 10, 2014 at 10:07:35AM +0100, Sascha Hauer wrote:
> On Sat, Feb 08, 2014 at 06:26:41PM +0400, Alexander Shiyan wrote:
> > Суббота,  8 февраля 2014, 15:16 +01:00 от Eric Bénard <eric@eukrea.com>:
> > > Signed-off-by: Eric Bénard <eric@eukrea.com>
> > > ---
> > > arch/arm/dts/imx53.dtsi | 9 +++++++++
> > > 1 file changed, 9 insertions(+)
> > > 
> > > diff --git a/arch/arm/dts/imx53.dtsi b/arch/arm/dts/imx53.dtsi
> > > index 678547c..91659b8 100644
> > > --- a/arch/arm/dts/imx53.dtsi
> > > +++ b/arch/arm/dts/imx53.dtsi
> > > @@ -75,6 +75,15 @@
> > > interrupt-parent = <&tzic>;
> > > ranges;
> > > 
> > > +		sata: sata@10000000 {
> > > +			compatible = "fsl,imx53-ahci";
> > > +			reg = <0x10000000 0x1000>;
> > > +			interrupts = <28>;
> > > +			clocks = <&clks 173>, <&clks 5>, <&clks 188>;
> > > +			clock-names = "sata", "ahb", "per";
> > > +			status = "disabled";
> > > +		};
> > 
> > Sascha, we stop changing DTS of the kernel or not?
> > What is the ultimate solution?
> 
> I don't want to give out the rule "Only use unmodified dts in barebox"
> and then use dts files from Linux-next. If we only want to use
> unmodified dts files we have to use the ones from Linux mainline.
> Otherwise we are doomed when a pull request doesn't make it in the
> Kernel and then the dts files are changed significantly before the
> next merge window, as just happens with Shawns dts changes for 3.14.

So what I suggest for now is:

- I welcome all patches moving the clearly barebox specific stuff to
  separate files, like Sebastian already started.
- Use plain Linux Kernel dts files where possible. I will try and deny
  all changes to these files except "sync to Linux-x.y"
- Leave the i.MX dts files how they are until the changes currently
  queued in Linux-next hit mainline.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 2/7] ARM: i.MX53: Add sata to devicetree
  2014-02-10  9:15       ` Sascha Hauer
@ 2014-02-10  9:22         ` Alexander Shiyan
  0 siblings, 0 replies; 34+ messages in thread
From: Alexander Shiyan @ 2014-02-10  9:22 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Понедельник, 10 февраля 2014, 10:15 +01:00 от Sascha Hauer <s.hauer@pengutronix.de>:
> On Mon, Feb 10, 2014 at 10:07:35AM +0100, Sascha Hauer wrote:
> > On Sat, Feb 08, 2014 at 06:26:41PM +0400, Alexander Shiyan wrote:
> > > Суббота,  8 февраля 2014, 15:16 +01:00 от Eric Bénard <eric@eukrea.com>:
> > > > Signed-off-by: Eric Bénard <eric@eukrea.com>
> > > > ---
> > > > arch/arm/dts/imx53.dtsi | 9 +++++++++
> > > > 1 file changed, 9 insertions(+)
> > > > 
> > > > diff --git a/arch/arm/dts/imx53.dtsi b/arch/arm/dts/imx53.dtsi
> > > > index 678547c..91659b8 100644
> > > > --- a/arch/arm/dts/imx53.dtsi
> > > > +++ b/arch/arm/dts/imx53.dtsi
> > > > @@ -75,6 +75,15 @@
> > > > interrupt-parent = <&tzic>;
> > > > ranges;
> > > > 
> > > > +		sata: sata@10000000 {
> > > > +			compatible = "fsl,imx53-ahci";
> > > > +			reg = <0x10000000 0x1000>;
> > > > +			interrupts = <28>;
> > > > +			clocks = <&clks 173>, <&clks 5>, <&clks 188>;
> > > > +			clock-names = "sata", "ahb", "per";
> > > > +			status = "disabled";
> > > > +		};
> > > 
> > > Sascha, we stop changing DTS of the kernel or not?
> > > What is the ultimate solution?
> > 
> > I don't want to give out the rule "Only use unmodified dts in barebox"
> > and then use dts files from Linux-next. If we only want to use
> > unmodified dts files we have to use the ones from Linux mainline.
> > Otherwise we are doomed when a pull request doesn't make it in the
> > Kernel and then the dts files are changed significantly before the
> > next merge window, as just happens with Shawns dts changes for 3.14.
> 
> So what I suggest for now is:
> 
> - I welcome all patches moving the clearly barebox specific stuff to
> separate files, like Sebastian already started.
> - Use plain Linux Kernel dts files where possible. I will try and deny
> all changes to these files except "sync to Linux-x.y"
> - Leave the i.MX dts files how they are until the changes currently
> queued in Linux-next hit mainline.

Nice. 
Something I already updated back into the kernel (imx27-phycard series).

---
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH v2 1/7] sata-imx: i.MX53, use the internal 120MHz clock by default
  2014-02-10  9:11                 ` Sascha Hauer
@ 2014-03-07 10:39                   ` Eric Bénard
  2014-03-07 10:39                     ` [PATCH v2 2/7] ARM: i.MX53: Add sata to devicetree Eric Bénard
                                       ` (6 more replies)
  0 siblings, 7 replies; 34+ messages in thread
From: Eric Bénard @ 2014-03-07 10:39 UTC (permalink / raw)
  To: barebox

this allows SATA to work on i.MX53 QSB-R :
barebox@Freescale i.MX53 Quick Start-R Board:/ ata0.probe=1
imx-sata 10000000.sata: port 0: SATA link ok
imx-sata 10000000.sata: port 0: Spinning up device...
imx-sata 10000000.sata: port 0: ok.
ata0: registered /dev/ata0

before this fix the log was :
barebox@Freescale i.MX53 Quick Start-R Board:/ ata0.probe=1
imx-sata 10000000.sata: port 0: SATA link timeout
set parameter: Connection timed out

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 drivers/ata/sata-imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ata/sata-imx.c b/drivers/ata/sata-imx.c
index b7bd110..450cf4f 100644
--- a/drivers/ata/sata-imx.c
+++ b/drivers/ata/sata-imx.c
@@ -59,7 +59,7 @@ static int imx53_sata_init(struct imx_ahci *imx_ahci)
 	 */
 	val = readl(base + 0x180c);
 	val &= (0x3 << 1);
-	val |= (0x1 << 1);
+	val |= (0x2 << 1);
 	writel(val, base + 0x180c);
 
 	return 0;
-- 
1.8.3.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH v2 2/7] ARM: i.MX53: Add sata to devicetree
  2014-03-07 10:39                   ` [PATCH v2 1/7] sata-imx: i.MX53, use the internal 120MHz clock by default Eric Bénard
@ 2014-03-07 10:39                     ` Eric Bénard
  2014-03-10  7:08                       ` Sascha Hauer
  2014-03-07 10:39                     ` [PATCH v2 3/7] ARM: mx53-qsrb: fix USB Eric Bénard
                                       ` (5 subsequent siblings)
  6 siblings, 1 reply; 34+ messages in thread
From: Eric Bénard @ 2014-03-07 10:39 UTC (permalink / raw)
  To: barebox

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
v2: update the SATA entry to be compatible with the kernel, but do
  not use the Linux-next dts. This means use plain numbers, but the
  correct clock names.
  
 arch/arm/dts/imx53.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/dts/imx53.dtsi b/arch/arm/dts/imx53.dtsi
index 678547c..a28c4c7 100644
--- a/arch/arm/dts/imx53.dtsi
+++ b/arch/arm/dts/imx53.dtsi
@@ -75,6 +75,15 @@
 		interrupt-parent = <&tzic>;
 		ranges;
 
+		sata: sata@10000000 {
+			compatible = "fsl,imx53-ahci";
+			reg = <0x10000000 0x1000>;
+			interrupts = <28>;
+			clocks = <&clks 173>, <&clks 188>, <&clks 5>;
+			clock-names = "sata_gate", "sata_ref", "ahb";
+			status = "disabled";
+		};
+
 		ipu: ipu@18000000 {
 			#crtc-cells = <1>;
 			compatible = "fsl,imx53-ipu";
-- 
1.8.3.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH v2 3/7] ARM: mx53-qsrb: fix USB
  2014-03-07 10:39                   ` [PATCH v2 1/7] sata-imx: i.MX53, use the internal 120MHz clock by default Eric Bénard
  2014-03-07 10:39                     ` [PATCH v2 2/7] ARM: i.MX53: Add sata to devicetree Eric Bénard
@ 2014-03-07 10:39                     ` Eric Bénard
  2014-03-07 10:40                     ` [PATCH v2 4/7] ARM: mx53-qsrb: enable USB host Eric Bénard
                                       ` (4 subsequent siblings)
  6 siblings, 0 replies; 34+ messages in thread
From: Eric Bénard @ 2014-03-07 10:39 UTC (permalink / raw)
  To: barebox

- configure the MC34708 properly so that USB can work
(the sequence is taken from u-boot)
- add the required defines to the mc13xxx include file

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 arch/arm/boards/freescale-mx53-qsb/board.c | 45 ++++++++++++++++++++++++++++++
 include/mfd/mc13xxx.h                      | 11 ++++++++
 2 files changed, 56 insertions(+)

diff --git a/arch/arm/boards/freescale-mx53-qsb/board.c b/arch/arm/boards/freescale-mx53-qsb/board.c
index 69036da..74826e4 100644
--- a/arch/arm/boards/freescale-mx53-qsb/board.c
+++ b/arch/arm/boards/freescale-mx53-qsb/board.c
@@ -93,11 +93,56 @@ static int loco_late_init(void)
 
 	mc34708 = mc13xxx_get();
 	if (mc34708) {
+		unsigned int val;
+		int ret;
 		/* get the board revision from fuse */
 		rev = readl(MX53_IIM_BASE_ADDR + 0x878);
 		set_board_rev(rev);
 		printf("MCIMX53-START-R board 1.0 rev %c\n", (rev == 1) ? 'A' : 'B' );
 		armlinux_set_revision(loco_system_rev);
+		/* Set VDDGP to 1.25V for 1GHz on SW1 */
+		mc13xxx_reg_read(mc34708, MC13892_REG_SW_0, &val);
+		val = (val & ~SWx_VOLT_MASK_MC34708) | SWx_1_250V_MC34708;
+		ret = mc13xxx_reg_write(mc34708, MC13892_REG_SW_0, val);
+		if (ret) {
+			printf("Writing to REG_SW_0 failed: %d\n", ret);
+			return ret;
+		}
+
+		/* Set VCC as 1.30V on SW2 */
+		mc13xxx_reg_read(mc34708, MC13892_REG_SW_1, &val);
+		val = (val & ~SWx_VOLT_MASK_MC34708) | SWx_1_300V_MC34708;
+		ret = mc13xxx_reg_write(mc34708, MC13892_REG_SW_1, val);
+		if (ret) {
+			printf("Writing to REG_SW_1 failed: %d\n", ret);
+			return ret;
+		}
+
+		/* Set global reset timer to 4s */
+		mc13xxx_reg_read(mc34708, MC13892_REG_POWER_CTL2, &val);
+		val = (val & ~TIMER_MASK_MC34708) | TIMER_4S_MC34708;
+		ret = mc13xxx_reg_write(mc34708, MC13892_REG_POWER_CTL2, val);
+		if (ret) {
+			printf("Writing to REG_POWER_CTL2 failed: %d\n", ret);
+			return ret;
+		}
+
+		/* Set VUSBSEL and VUSBEN for USB PHY supply*/
+		mc13xxx_reg_read(mc34708, MC13892_REG_MODE_0, &val);
+		val |= (VUSBSEL_MC34708 | VUSBEN_MC34708);
+		ret = mc13xxx_reg_write(mc34708, MC13892_REG_MODE_0, val);
+		if (ret) {
+			printf("Writing to REG_MODE_0 failed: %d\n", ret);
+			return ret;
+		}
+
+		/* Set SWBST to 5V in auto mode */
+		val = SWBST_AUTO;
+		ret = mc13xxx_reg_write(mc34708, SWBST_CTRL, val);
+		if (ret) {
+			printf("Writing to SWBST_CTRL failed: %d\n", ret);
+			return ret;
+		}
 	} else {
 		/* so we have a DA9053 based board */
 		printf("MCIMX53-START board 1.0\n");
diff --git a/include/mfd/mc13xxx.h b/include/mfd/mc13xxx.h
index cba8589..1946b1a 100644
--- a/include/mfd/mc13xxx.h
+++ b/include/mfd/mc13xxx.h
@@ -152,6 +152,17 @@
 #define MC13783_SW1B_SOFTSTART		(1 << 17)
 #define MC13783_SW_PLL_FACTOR(x)	(((x) - 28) << 19)
 
+/* MC34708 Definitions */
+#define SWx_VOLT_MASK_MC34708	0x3F
+#define SWx_1_250V_MC34708	0x30
+#define SWx_1_300V_MC34708	0x34
+#define TIMER_MASK_MC34708	0x300
+#define TIMER_4S_MC34708	0x100
+#define VUSBSEL_MC34708		(1 << 2)
+#define VUSBEN_MC34708		(1 << 3)
+#define SWBST_CTRL		31
+#define SWBST_AUTO		0x8
+
 struct mc13xxx;
 
 #ifdef CONFIG_MFD_MC13XXX
-- 
1.8.3.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH v2 4/7] ARM: mx53-qsrb: enable USB host
  2014-03-07 10:39                   ` [PATCH v2 1/7] sata-imx: i.MX53, use the internal 120MHz clock by default Eric Bénard
  2014-03-07 10:39                     ` [PATCH v2 2/7] ARM: i.MX53: Add sata to devicetree Eric Bénard
  2014-03-07 10:39                     ` [PATCH v2 3/7] ARM: mx53-qsrb: fix USB Eric Bénard
@ 2014-03-07 10:40                     ` Eric Bénard
  2014-03-07 10:40                     ` [PATCH v2 5/7] ARM: mx53-qsrb: enable USB OTG in host mode Eric Bénard
                                       ` (3 subsequent siblings)
  6 siblings, 0 replies; 34+ messages in thread
From: Eric Bénard @ 2014-03-07 10:40 UTC (permalink / raw)
  To: barebox

- declare the rigth mux for the GPIO used to enable the USB's 5V
- enable USB host controller

tested on i.MX53 START-R :
barebox@Freescale i.MX53 Quick Start-R Board:/ usb -f
USB: scanning bus for devices...
Bus 001 Device 001: ID 0000:0000 EHCI Host Controller
Using index 0 for the new disk
Bus 002 Device 003: ID 0951:1654 DT R500
Bus 002 Device 002: ID 0000:0000 EHCI Host Controller
3 USB Device(s) found

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 arch/arm/dts/imx53-qsb-common.dtsi | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/imx53-qsb-common.dtsi b/arch/arm/dts/imx53-qsb-common.dtsi
index f2f912b..4ae1f49 100644
--- a/arch/arm/dts/imx53-qsb-common.dtsi
+++ b/arch/arm/dts/imx53-qsb-common.dtsi
@@ -158,6 +158,7 @@
 				MX53_PAD_EIM_DA13__GPIO3_13       0x80000000
 				MX53_PAD_PATA_DA_0__GPIO7_6       0x80000000
 				MX53_PAD_GPIO_16__GPIO7_11        0x80000000
+				MX53_PAD_PATA_DA_2__GPIO7_8       0x80000000
 			>;
 		};
 
@@ -216,9 +217,12 @@
 };
 
 &usbh1 {
-       status = "okay";
+	phy_type = "utmi";
+	dr_mode = "host";
+	status = "okay";
 };
 
 &usbotg {
        status = "okay";
 };
+
-- 
1.8.3.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH v2 5/7] ARM: mx53-qsrb: enable USB OTG in host mode
  2014-03-07 10:39                   ` [PATCH v2 1/7] sata-imx: i.MX53, use the internal 120MHz clock by default Eric Bénard
                                       ` (2 preceding siblings ...)
  2014-03-07 10:40                     ` [PATCH v2 4/7] ARM: mx53-qsrb: enable USB host Eric Bénard
@ 2014-03-07 10:40                     ` Eric Bénard
  2014-03-07 10:40                     ` [PATCH v2 6/7] ARM: mx53-qsrb: enable sata Eric Bénard
                                       ` (2 subsequent siblings)
  6 siblings, 0 replies; 34+ messages in thread
From: Eric Bénard @ 2014-03-07 10:40 UTC (permalink / raw)
  To: barebox

tested on i.MX53 START-R :
barebox@Freescale i.MX53 Quick Start-R Board:/ usb -f
USB: scanning bus for devices...
Using index 0 for the new disk
Bus 001 Device 002: ID 0951:1654 DT R500
Bus 001 Device 001: ID 0000:0000 EHCI Host Controller
Bus 002 Device 003: ID 0000:0000 EHCI Host Controller
3 USB Device(s) found

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
v2 : Remove the dr_mode = "host" line

 arch/arm/dts/imx53-qsb-common.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/imx53-qsb-common.dtsi b/arch/arm/dts/imx53-qsb-common.dtsi
index 4ae1f49..3a9d55e 100644
--- a/arch/arm/dts/imx53-qsb-common.dtsi
+++ b/arch/arm/dts/imx53-qsb-common.dtsi
@@ -223,6 +223,7 @@
 };
 
 &usbotg {
-       status = "okay";
+	phy_type = "utmi";
+	status = "okay";
 };
 
-- 
1.8.3.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH v2 6/7] ARM: mx53-qsrb: enable sata
  2014-03-07 10:39                   ` [PATCH v2 1/7] sata-imx: i.MX53, use the internal 120MHz clock by default Eric Bénard
                                       ` (3 preceding siblings ...)
  2014-03-07 10:40                     ` [PATCH v2 5/7] ARM: mx53-qsrb: enable USB OTG in host mode Eric Bénard
@ 2014-03-07 10:40                     ` Eric Bénard
  2014-03-07 10:40                     ` [PATCH v2 7/7] ARM: mx53-qsb: update defconfig Eric Bénard
  2014-03-10  7:09                     ` [PATCH v2 1/7] sata-imx: i.MX53, use the internal 120MHz clock by default Sascha Hauer
  6 siblings, 0 replies; 34+ messages in thread
From: Eric Bénard @ 2014-03-07 10:40 UTC (permalink / raw)
  To: barebox

tested on i.MX53 START-R :
barebox@Freescale i.MX53 Quick Start-R Board:/ ata0.probe=1
imx-sata 10000000.sata: port 0: SATA link ok
imx-sata 10000000.sata: port 0: Spinning up device...
imx-sata 10000000.sata: port 0: ok.
ata0: registered /dev/ata0

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 arch/arm/dts/imx53-qsb-common.dtsi | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/dts/imx53-qsb-common.dtsi b/arch/arm/dts/imx53-qsb-common.dtsi
index 3a9d55e..571da92 100644
--- a/arch/arm/dts/imx53-qsb-common.dtsi
+++ b/arch/arm/dts/imx53-qsb-common.dtsi
@@ -227,3 +227,6 @@
 	status = "okay";
 };
 
+&sata {
+	status = "okay";
+};
-- 
1.8.3.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH v2 7/7] ARM: mx53-qsb: update defconfig
  2014-03-07 10:39                   ` [PATCH v2 1/7] sata-imx: i.MX53, use the internal 120MHz clock by default Eric Bénard
                                       ` (4 preceding siblings ...)
  2014-03-07 10:40                     ` [PATCH v2 6/7] ARM: mx53-qsrb: enable sata Eric Bénard
@ 2014-03-07 10:40                     ` Eric Bénard
  2014-03-10  7:09                     ` [PATCH v2 1/7] sata-imx: i.MX53, use the internal 120MHz clock by default Sascha Hauer
  6 siblings, 0 replies; 34+ messages in thread
From: Eric Bénard @ 2014-03-07 10:40 UTC (permalink / raw)
  To: barebox

- enable more commands :
    (menu, password, loadb, let, mm, sha*, bootz, of*, memtest)
- enable led and led triggers
- enable sata support
- enable USB chipidea support
- enable USB network drivers
- enable NFS and DNS support
- enable EXT4 support

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 arch/arm/configs/freescale-mx53-qsb_defconfig | 31 +++++++++++++++++++++++++--
 1 file changed, 29 insertions(+), 2 deletions(-)

diff --git a/arch/arm/configs/freescale-mx53-qsb_defconfig b/arch/arm/configs/freescale-mx53-qsb_defconfig
index afe8b72..8365234 100644
--- a/arch/arm/configs/freescale-mx53-qsb_defconfig
+++ b/arch/arm/configs/freescale-mx53-qsb_defconfig
@@ -16,6 +16,7 @@ CONFIG_HUSH_FANCY_PROMPT=y
 CONFIG_CMDLINE_EDITING=y
 CONFIG_AUTO_COMPLETE=y
 CONFIG_MENU=y
+CONFIG_BLSPEC=y
 CONFIG_CONSOLE_ACTIVATE_NONE=y
 CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
 CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/freescale-mx53-qsb/env/"
@@ -25,31 +26,44 @@ CONFIG_CMD_EDIT=y
 CONFIG_CMD_SLEEP=y
 CONFIG_CMD_MSLEEP=y
 CONFIG_CMD_SAVEENV=y
+CONFIG_CMD_LOADENV=y
 CONFIG_CMD_EXPORT=y
 CONFIG_CMD_PRINTENV=y
 CONFIG_CMD_READLINE=y
+CONFIG_CMD_LET=y
 CONFIG_CMD_MENU=y
 CONFIG_CMD_MENU_MANAGEMENT=y
+CONFIG_CMD_PASSWD=y
+CONFIG_PASSWD_MODE_STAR=y
 CONFIG_CMD_TIME=y
 CONFIG_CMD_LN=y
 CONFIG_CMD_TFTP=y
 CONFIG_CMD_FILETYPE=y
 CONFIG_CMD_ECHO_E=y
+CONFIG_CMD_LOADB=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_IOMEM=y
+CONFIG_CMD_MM=y
 CONFIG_CMD_CRC=y
 CONFIG_CMD_CRC_CMP=y
 CONFIG_CMD_MD5SUM=y
+CONFIG_CMD_SHA1SUM=y
+CONFIG_CMD_SHA256SUM=y
+CONFIG_CMD_SHA224SUM=y
 CONFIG_CMD_BOOTM_SHOW_TYPE=y
 CONFIG_CMD_BOOTM_VERBOSE=y
 CONFIG_CMD_BOOTM_INITRD=y
 CONFIG_CMD_BOOTM_OFTREE=y
 CONFIG_CMD_BOOTM_OFTREE_UIMAGE=y
+CONFIG_CMD_BOOTM_AIMAGE=y
 CONFIG_CMD_UIMAGE=y
-# CONFIG_CMD_BOOTU is not set
+CONFIG_CMD_BOOTZ=y
 CONFIG_CMD_RESET=y
 CONFIG_CMD_GO=y
 CONFIG_CMD_OFTREE=y
+CONFIG_CMD_OF_PROPERTY=y
+CONFIG_CMD_OF_NODE=y
+CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_BAREBOX_UPDATE=y
 CONFIG_CMD_TIMEOUT=y
 CONFIG_CMD_PARTITION=y
@@ -64,23 +78,36 @@ CONFIG_CMD_DETECT=y
 CONFIG_CMD_WD=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
+CONFIG_NET_NFS=y
 CONFIG_NET_PING=y
 CONFIG_NET_NETCONSOLE=y
+CONFIG_NET_RESOLV=y
 CONFIG_OFDEVICE=y
 CONFIG_SMSC_PHY=y
 CONFIG_DRIVER_NET_FEC_IMX=y
+CONFIG_NET_USB=y
+CONFIG_NET_USB_ASIX=y
+CONFIG_NET_USB_SMSC95XX=y
 # CONFIG_SPI is not set
 CONFIG_I2C=y
 CONFIG_I2C_IMX=y
-CONFIG_DISK_ATA=y
+CONFIG_DISK_AHCI=y
+CONFIG_DISK_AHCI_IMX=y
 CONFIG_USB=y
+CONFIG_USB_IMX_CHIPIDEA=y
 CONFIG_USB_EHCI=y
+CONFIG_USB_ULPI=y
 CONFIG_USB_STORAGE=y
 CONFIG_MCI=y
 CONFIG_MCI_IMX_ESDHC=y
 CONFIG_MFD_MC13XXX=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_LED_GPIO_OF=y
+CONFIG_LED_TRIGGERS=y
 CONFIG_WATCHDOG=y
 CONFIG_WATCHDOG_IMX=y
+CONFIG_FS_EXT4=y
 CONFIG_FS_TFTP=y
 CONFIG_FS_NFS=y
 CONFIG_FS_FAT=y
-- 
1.8.3.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH v2 2/7] ARM: i.MX53: Add sata to devicetree
  2014-03-07 10:39                     ` [PATCH v2 2/7] ARM: i.MX53: Add sata to devicetree Eric Bénard
@ 2014-03-10  7:08                       ` Sascha Hauer
  0 siblings, 0 replies; 34+ messages in thread
From: Sascha Hauer @ 2014-03-10  7:08 UTC (permalink / raw)
  To: Eric Bénard; +Cc: barebox

Hi Eric,

On Fri, Mar 07, 2014 at 11:39:58AM +0100, Eric Bénard wrote:
> Signed-off-by: Eric Bénard <eric@eukrea.com>
> ---
> v2: update the SATA entry to be compatible with the kernel, but do
>   not use the Linux-next dts. This means use plain numbers, but the
>   correct clock names.

It seems I already accidently applied v1 of this patch. Instead of this
one I merged a fixup patch. Please check the result in the -next branch.

Sascha

>   
>  arch/arm/dts/imx53.dtsi | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/arch/arm/dts/imx53.dtsi b/arch/arm/dts/imx53.dtsi
> index 678547c..a28c4c7 100644
> --- a/arch/arm/dts/imx53.dtsi
> +++ b/arch/arm/dts/imx53.dtsi
> @@ -75,6 +75,15 @@
>  		interrupt-parent = <&tzic>;
>  		ranges;
>  
> +		sata: sata@10000000 {
> +			compatible = "fsl,imx53-ahci";
> +			reg = <0x10000000 0x1000>;
> +			interrupts = <28>;
> +			clocks = <&clks 173>, <&clks 188>, <&clks 5>;
> +			clock-names = "sata_gate", "sata_ref", "ahb";
> +			status = "disabled";
> +		};
> +
>  		ipu: ipu@18000000 {
>  			#crtc-cells = <1>;
>  			compatible = "fsl,imx53-ipu";
> -- 
> 1.8.3.1
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH v2 1/7] sata-imx: i.MX53, use the internal 120MHz clock by default
  2014-03-07 10:39                   ` [PATCH v2 1/7] sata-imx: i.MX53, use the internal 120MHz clock by default Eric Bénard
                                       ` (5 preceding siblings ...)
  2014-03-07 10:40                     ` [PATCH v2 7/7] ARM: mx53-qsb: update defconfig Eric Bénard
@ 2014-03-10  7:09                     ` Sascha Hauer
  2014-03-10  7:51                       ` Eric Bénard
  6 siblings, 1 reply; 34+ messages in thread
From: Sascha Hauer @ 2014-03-10  7:09 UTC (permalink / raw)
  To: Eric Bénard; +Cc: barebox

On Fri, Mar 07, 2014 at 11:39:57AM +0100, Eric Bénard wrote:
> this allows SATA to work on i.MX53 QSB-R :
> barebox@Freescale i.MX53 Quick Start-R Board:/ ata0.probe=1
> imx-sata 10000000.sata: port 0: SATA link ok
> imx-sata 10000000.sata: port 0: Spinning up device...
> imx-sata 10000000.sata: port 0: ok.
> ata0: registered /dev/ata0
> 
> before this fix the log was :
> barebox@Freescale i.MX53 Quick Start-R Board:/ ata0.probe=1
> imx-sata 10000000.sata: port 0: SATA link timeout
> set parameter: Connection timed out
> 
> Signed-off-by: Eric Bénard <eric@eukrea.com>
> ---
>  drivers/ata/sata-imx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/ata/sata-imx.c b/drivers/ata/sata-imx.c
> index b7bd110..450cf4f 100644
> --- a/drivers/ata/sata-imx.c
> +++ b/drivers/ata/sata-imx.c
> @@ -59,7 +59,7 @@ static int imx53_sata_init(struct imx_ahci *imx_ahci)
>  	 */
>  	val = readl(base + 0x180c);
>  	val &= (0x3 << 1);
> -	val |= (0x1 << 1);
> +	val |= (0x2 << 1);
>  	writel(val, base + 0x180c);

I haven't applied this yet. Have you tested this on the regular (not -R)
variant of the board? If not I'd like to do that before applying.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH v2 1/7] sata-imx: i.MX53, use the internal 120MHz clock by default
  2014-03-10  7:09                     ` [PATCH v2 1/7] sata-imx: i.MX53, use the internal 120MHz clock by default Sascha Hauer
@ 2014-03-10  7:51                       ` Eric Bénard
  2014-03-11  5:32                         ` Sascha Hauer
  0 siblings, 1 reply; 34+ messages in thread
From: Eric Bénard @ 2014-03-10  7:51 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Hi Sascha,

Le Mon, 10 Mar 2014 08:09:57 +0100,
Sascha Hauer <s.hauer@pengutronix.de> a écrit :

> On Fri, Mar 07, 2014 at 11:39:57AM +0100, Eric Bénard wrote:
> > this allows SATA to work on i.MX53 QSB-R :
> > barebox@Freescale i.MX53 Quick Start-R Board:/ ata0.probe=1
> > imx-sata 10000000.sata: port 0: SATA link ok
> > imx-sata 10000000.sata: port 0: Spinning up device...
> > imx-sata 10000000.sata: port 0: ok.
> > ata0: registered /dev/ata0
> > 
> > before this fix the log was :
> > barebox@Freescale i.MX53 Quick Start-R Board:/ ata0.probe=1
> > imx-sata 10000000.sata: port 0: SATA link timeout
> > set parameter: Connection timed out
> > 
> > Signed-off-by: Eric Bénard <eric@eukrea.com>
> > ---
> >  drivers/ata/sata-imx.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/ata/sata-imx.c b/drivers/ata/sata-imx.c
> > index b7bd110..450cf4f 100644
> > --- a/drivers/ata/sata-imx.c
> > +++ b/drivers/ata/sata-imx.c
> > @@ -59,7 +59,7 @@ static int imx53_sata_init(struct imx_ahci *imx_ahci)
> >  	 */
> >  	val = readl(base + 0x180c);
> >  	val &= (0x3 << 1);
> > -	val |= (0x1 << 1);
> > +	val |= (0x2 << 1);
> >  	writel(val, base + 0x180c);
> 
> I haven't applied this yet. Have you tested this on the regular (not -R)
> variant of the board? If not I'd like to do that before applying.

I can try to test on an original QSB (with Dialog PMIC) but I don't see
why that would change as the difference between QSB and QSB-R is the
PMIC (Dialog to Freescale) and here we only change the clock source of
the SATA which has nothing to see with the PMIC.

Eric

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH v2 1/7] sata-imx: i.MX53, use the internal 120MHz clock by default
  2014-03-10  7:51                       ` Eric Bénard
@ 2014-03-11  5:32                         ` Sascha Hauer
  0 siblings, 0 replies; 34+ messages in thread
From: Sascha Hauer @ 2014-03-11  5:32 UTC (permalink / raw)
  To: Eric Bénard; +Cc: barebox

On Mon, Mar 10, 2014 at 08:51:12AM +0100, Eric Bénard wrote:
> Hi Sascha,
> 
> Le Mon, 10 Mar 2014 08:09:57 +0100,
> Sascha Hauer <s.hauer@pengutronix.de> a écrit :
> 
> > On Fri, Mar 07, 2014 at 11:39:57AM +0100, Eric Bénard wrote:
> > > this allows SATA to work on i.MX53 QSB-R :
> > > barebox@Freescale i.MX53 Quick Start-R Board:/ ata0.probe=1
> > > imx-sata 10000000.sata: port 0: SATA link ok
> > > imx-sata 10000000.sata: port 0: Spinning up device...
> > > imx-sata 10000000.sata: port 0: ok.
> > > ata0: registered /dev/ata0
> > > 
> > > before this fix the log was :
> > > barebox@Freescale i.MX53 Quick Start-R Board:/ ata0.probe=1
> > > imx-sata 10000000.sata: port 0: SATA link timeout
> > > set parameter: Connection timed out
> > > 
> > > Signed-off-by: Eric Bénard <eric@eukrea.com>
> > > ---
> > >  drivers/ata/sata-imx.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/ata/sata-imx.c b/drivers/ata/sata-imx.c
> > > index b7bd110..450cf4f 100644
> > > --- a/drivers/ata/sata-imx.c
> > > +++ b/drivers/ata/sata-imx.c
> > > @@ -59,7 +59,7 @@ static int imx53_sata_init(struct imx_ahci *imx_ahci)
> > >  	 */
> > >  	val = readl(base + 0x180c);
> > >  	val &= (0x3 << 1);
> > > -	val |= (0x1 << 1);
> > > +	val |= (0x2 << 1);
> > >  	writel(val, base + 0x180c);
> > 
> > I haven't applied this yet. Have you tested this on the regular (not -R)
> > variant of the board? If not I'd like to do that before applying.
> 
> I can try to test on an original QSB (with Dialog PMIC) but I don't see
> why that would change as the difference between QSB and QSB-R is the
> PMIC (Dialog to Freescale) and here we only change the clock source of
> the SATA which has nothing to see with the PMIC.

Yeah, you're probably right. I just wonder why we explicitly used the
external clock in the first place and if there's a reason to make this
configurable.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2014-03-11  5:33 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-08 14:16 [PATCH 1/7] sata-imx: i.MX53, use the internal 120MHz clock by default Eric Bénard
2014-02-08 14:16 ` [PATCH 2/7] ARM: i.MX53: Add sata to devicetree Eric Bénard
2014-02-08 14:26   ` Alexander Shiyan
2014-02-10  8:33     ` Sascha Hauer
2014-02-10  8:39       ` Eric Bénard
2014-02-10  8:40       ` Alexander Shiyan
2014-02-10  8:48         ` Eric Bénard
2014-02-10  8:52           ` Sascha Hauer
2014-02-10  8:54             ` Eric Bénard
2014-02-10  9:03               ` Sascha Hauer
2014-02-10  9:11                 ` Sascha Hauer
2014-03-07 10:39                   ` [PATCH v2 1/7] sata-imx: i.MX53, use the internal 120MHz clock by default Eric Bénard
2014-03-07 10:39                     ` [PATCH v2 2/7] ARM: i.MX53: Add sata to devicetree Eric Bénard
2014-03-10  7:08                       ` Sascha Hauer
2014-03-07 10:39                     ` [PATCH v2 3/7] ARM: mx53-qsrb: fix USB Eric Bénard
2014-03-07 10:40                     ` [PATCH v2 4/7] ARM: mx53-qsrb: enable USB host Eric Bénard
2014-03-07 10:40                     ` [PATCH v2 5/7] ARM: mx53-qsrb: enable USB OTG in host mode Eric Bénard
2014-03-07 10:40                     ` [PATCH v2 6/7] ARM: mx53-qsrb: enable sata Eric Bénard
2014-03-07 10:40                     ` [PATCH v2 7/7] ARM: mx53-qsb: update defconfig Eric Bénard
2014-03-10  7:09                     ` [PATCH v2 1/7] sata-imx: i.MX53, use the internal 120MHz clock by default Sascha Hauer
2014-03-10  7:51                       ` Eric Bénard
2014-03-11  5:32                         ` Sascha Hauer
2014-02-10  9:07     ` [PATCH 2/7] ARM: i.MX53: Add sata to devicetree Sascha Hauer
2014-02-10  9:15       ` Sascha Hauer
2014-02-10  9:22         ` Alexander Shiyan
2014-02-08 14:16 ` [PATCH 3/7] ARM: mx53-qsrb: fix USB Eric Bénard
2014-02-08 14:16 ` [PATCH 4/7] ARM: mx53-qsrb: enable USB host Eric Bénard
2014-02-08 14:16 ` [PATCH 5/7] ARM: mx53-qsrb: enable USB OTG in host mode Eric Bénard
2014-02-10  8:16   ` Sascha Hauer
2014-02-10  8:28     ` Eric Bénard
2014-02-10  8:31       ` Sascha Hauer
2014-02-10  8:37         ` Eric Bénard
2014-02-08 14:16 ` [PATCH 6/7] ARM: mx53-qsrb: enable sata Eric Bénard
2014-02-08 14:16 ` [PATCH 7/7] ARM: mx53-qsb: update defconfig Eric Bénard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox