From: Miquel Raynal <miquel.raynal@bootlin.com>
To: "Timothy Krantz" <tkrantz@stahurabrenner.com>
Cc: linux-arm-kernel@lists.infradead.org
Subject: Re: espressobin device tree with kernel 5.1 RC
Date: Wed, 19 Jun 2019 12:29:17 +0200 [thread overview]
Message-ID: <20190619122917.4596330e@xps13> (raw)
In-Reply-To: <!&!AAAAAAAAAAAuAAAAAAAAAOBWTR25SONAuESb5loyl/sBAMO2jhD3dRHOtM0AqgC7tuYAAAAAAA4AABAAAADR16E09XXER6uZHU0JciqJAQAAAAA=@stahurabrenner.com>
Hi Timothy,
"Timothy Krantz" <tkrantz@stahurabrenner.com> wrote on Tue, 18 Jun 2019
16:07:34 -0400:
> Hi Miquel,
>
> > -----Original Message-----
> >
> > I don't think it's a hw problem, v5 is fine. Have you updated your firmware
> > recently? You will need a recent firmware (ATF) in order to have the SMC
> > calls to work. You can trace the _power_on() function which probably fails at
> > its end in drivers/phy/marvell/phy-mvebu-a3700-comphy.c.
> >
> > Good luck!
> > Miquèl
>
> I added the following traces to drivers/phy/marvell/phy-mvebu-a3700-comphy.c :
>
> static int mvebu_a3700_comphy_smc(unsigned long function, unsigned long lane,
> unsigned long mode)
> {
> struct arm_smccc_res res;
>
> printk(KERN_INFO "in a3700 comphy smc\n");
> arm_smccc_smc(function, lane, mode, 0, 0, 0, 0, 0, &res);
> printk(KERN_INFO "res.a0=%lx\n", res.a0);
>
> return res.a0;
> }
>
> And
> static int mvebu_a3700_comphy_power_on(struct phy *phy)
> {
> struct mvebu_a3700_comphy_lane *lane = phy_get_drvdata(phy);
> u32 fw_param;
> int fw_mode;
>
> fw_mode = mvebu_a3700_comphy_get_fw_mode(lane->id, lane->port,
> lane->mode, lane->submode);
> printk(KERN_INFO "in power on\n");
> if (fw_mode < 0) {
> printk(KERN_INFO "fw_mode < 0\n");
> dev_err(lane->dev, "invalid COMPHY mode\n");
> return fw_mode;
> }
>
> printk(KERN_INFO "switch lane->mode\n");
> switch (lane->mode) {
> case PHY_MODE_USB_HOST_SS:
> printk(KERN_INFO "usb host\n");
> dev_dbg(lane->dev, "set lane %d to USB3 host mode\n", lane->id);
> fw_param = COMPHY_FW_MODE(fw_mode);
> break;
> case PHY_MODE_SATA:
> printk(KERN_INFO "sata\n");
> dev_dbg(lane->dev, "set lane %d to SATA mode\n", lane->id);
> fw_param = COMPHY_FW_MODE(fw_mode);
> break;
> case PHY_MODE_ETHERNET:
> switch (lane->submode) {
> case PHY_INTERFACE_MODE_SGMII:
> printk(KERN_INFO "sgmii\n");
> dev_dbg(lane->dev, "set lane %d to SGMII mode\n",
> lane->id);
> fw_param = COMPHY_FW_NET(fw_mode, lane->port,
> COMPHY_FW_SPEED_1_25G);
> break;
> case PHY_INTERFACE_MODE_2500BASEX:
> printk(KERN_INFO "HS sgmii\n");
> dev_dbg(lane->dev, "set lane %d to HS SGMII mode\n",
> lane->id);
> fw_param = COMPHY_FW_NET(fw_mode, lane->port,
> COMPHY_FW_SPEED_3_125G);
> break;
> default:
> printk(KERN_INFO "unsupported mode\n");
> dev_err(lane->dev, "unsupported PHY submode (%d)\n",
> lane->submode);
> return -ENOTSUPP;
> }
> break;
> case PHY_MODE_PCIE:
> printk(KERN_INFO "pcie\n");
> dev_dbg(lane->dev, "set lane %d to PCIe mode\n", lane->id);
> fw_param = COMPHY_FW_PCIE(fw_mode, lane->port,
> COMPHY_FW_SPEED_5G,
> phy->attrs.bus_width);
> break;
> default:
> printk(KERN_INFO "unsupported 2\n");
> dev_err(lane->dev, "unsupported PHY mode (%d)\n", lane->mode);
> return -ENOTSUPP;
> }
>
> return mvebu_a3700_comphy_smc(COMPHY_SIP_POWER_ON, lane->id, fw_param);
> }
>
> Resulting in the following dmesg:
>
> [ 4.204429] cacheinfo: Unable to detect cache hierarchy for CPU 0
> [ 4.210933] in mvebu probe
> [ 4.213664] check device match
> [ 4.216765] device did match
> [ 4.219825] check resources
> [ 4.222619] resources ok
> [ 4.225225] in phy init before check
> [ 4.228881] phy->init_count 0
> [ 4.231936] phy->ops->init (null)
> [ 4.235342] in power on
> [ 4.237847] switch lane->mode
> [ 4.240887] sata
> [ 4.242775] in a3700 comphy smc
> [ 4.246003] res.a0=ffffffffffffffff
> [ 4.249593] phy phy-d0018300.phy.2: phy poweron failed --> -1
> [ 4.255504] enable resources
> [ 4.258487] ahci-mvebu: probe of d00e0000.sata failed with error -1
> [ 4.265231] Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
>
>
> So [ 4.246003] res.a0=ffffffffffffffff is the power on failure?
That's indeed -1 if you consider it as a signed 64-bit value.
>
> > You will need a recent firmware (ATF) in order to have the SMC
> > calls to work.
>
> That sounds promising. My UBOOT is not *that* old:
>
> üTIM-1.0
> WTMI-devel-18.07.0-6050fd5
> WTMI: system early-init
> CPU VDD voltage default value: 1.155V
> NOTICE: Booting Trusted Firmware
> NOTICE: BL1: v1.5(release):711ecd3 (Marvell-armada-18.09.4)
> NOTICE: BL1: Built : 15:11:39, Sep 7 2018
> NOTICE: BL1: Booting BL2
> NOTICE: BL2: v1.5(release):711ecd3 (Marvell-armada-18.09.4)
> NOTICE: BL2: Built : 15:11:42, Sep 7 2018
> NOTICE: BL1: Booting BL31
> NOTICE: BL31: v1.5(release):711ecd3 (Marvell-armada-18.09.4)
> NOTICE: BL31: Built : 15:1
>
> U-Boot 2017.03-armada-18.09.1-ga92bd86-armbian (Sep 05 2018 - 21:49:34 +0200)
>
> Do you know where I might find a newer (pre built) uboot?
http://wiki.espressobin.net/tiki-index.php?page=Build+From+Source+-+Bootloader
Thanks,
Miquèl
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2019-06-19 10:29 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <!&!AAAAAAAAAAAuAAAAAAAAAOBWTR25SONAuESb5loyl/sBAMO2jhD3dRHOtM0AqgC7tuYAAAAAAA4AABAAAABB6J1kxOR7T73eMrM92Eq+AQAAAAA=@stahurabrenner.com>
2019-04-29 7:57 ` espressobin device tree with kernel 5.1 RC Miquel Raynal
2019-04-29 15:03 ` Timothy Krantz
2019-04-29 15:25 ` Uwe Kleine-König
2019-04-29 16:07 ` Marc Gonzalez
2019-04-29 18:10 ` Miquel Raynal
[not found] ` <!&!AAAAAAAAAAAuAAAAAAAAAOBWTR25SONAuESb5loyl/sBAMO2jhD3dRHOtM0AqgC7tuYAAAAAAA4AABAAAAABdzCVMdZ+R6253dvJGHcXAQAAAAA=@stahurabrenner.com>
2019-06-17 9:38 ` Miquel Raynal
2019-06-17 9:40 ` Miquel Raynal
2019-06-17 17:19 ` Timothy Krantz
2019-06-18 7:58 ` Miquel Raynal
2019-06-18 14:15 ` Timothy Krantz
2019-06-18 14:24 ` Miquel Raynal
2019-06-18 15:28 ` Timothy Krantz
2019-06-18 15:36 ` Miquel Raynal
2019-06-18 15:42 ` Timothy Krantz
2019-06-18 17:08 ` Timothy Krantz
2019-06-18 17:26 ` Miquel Raynal
2019-06-18 20:07 ` Timothy Krantz
2019-06-19 10:29 ` Miquel Raynal [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190619122917.4596330e@xps13 \
--to=miquel.raynal@bootlin.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=tkrantz@stahurabrenner.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.