From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
To: "Antoine Ténart" <antoine.tenart@free-electrons.com>,
tj@kernel.org, kishon@ti.com
Cc: alexandre.belloni@free-electrons.com,
thomas.petazzoni@free-electrons.com, zmxu@marvell.com,
jszhang@marvell.com, linux-arm-kernel@lists.infradead.org,
linux-ide@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 1/7] phy: add a driver for the Berlin SATA PHY
Date: Tue, 17 Jun 2014 20:17:02 +0200 [thread overview]
Message-ID: <53A0861E.90400@gmail.com> (raw)
In-Reply-To: <1402914392-6028-2-git-send-email-antoine.tenart@free-electrons.com>
On 06/16/2014 12:26 PM, Antoine Ténart wrote:
> The Berlin SoC has a two SATA ports. Add a PHY driver to handle them.
>
> The mode selection can let us think this PHY can be configured to fit
> other purposes. But there are reasons to think the SATA mode will be
> the only one usable: the PHY registers are only accessible indirectly
> through two registers in the SATA range, the PHY seems to be integrated
> and no information tells us the contrary. For these reasons, make the
> driver a SATA PHY driver.
>
> Signed-off-by: Antoine Ténart <antoine.tenart@free-electrons.com>
> ---
[...]
> diff --git a/drivers/phy/phy-berlin-sata.c b/drivers/phy/phy-berlin-sata.c
> new file mode 100644
> index 000000000000..907897a02672
> --- /dev/null
> +++ b/drivers/phy/phy-berlin-sata.c
> @@ -0,0 +1,232 @@
> +/*
> + * Marvell Berlin SATA PHY driver
> + *
> + * Copyright (C) 2014 Marvell Technology Group Ltd.
> + *
> + * Antoine Ténart <antoine.tenart@free-electrons.com>
> + *
> + * This file is licensed under the terms of the GNU General Public
> + * License version 2. This program is licensed "as is" without any
> + * warranty of any kind, whether express or implied.
> + */
> +
> +#include <linux/module.h>
> +#include <linux/phy/phy.h>
> +#include <linux/io.h>
> +#include <linux/platform_device.h>
> +
> +#define HOST_VSA_ADDR 0x0
> +#define HOST_VSA_DATA 0x4
> +#define PORT_VSR_ADDR 0x78
> +#define PORT_VSR_DATA 0x7c
> +#define PORT_SCR_CTL 0x2c
> +
> +#define CONTROL_REGISTER 0x0
> +#define MBUS_SIZE_CONTROL 0x4
> +
> +#define POWER_DOWN_PHY0 BIT(6)
> +#define POWER_DOWN_PHY1 BIT(14)
> +#define MBUS_WRITE_REQUEST_SIZE_128 (BIT(2) << 16)
> +#define MBUS_READ_REQUEST_SIZE_128 (BIT(2) << 19)
> +
> +#define PHY_BASE 0x200
Antoine,
I gave your Berlin AHCI patches a try on BG2. I finally got it working
but BG2 has a different PHY_BASE and need some register fixups.
Please update this patch and the DT bindings to reflect the difference
of BG2Q with respect to BG2 as below.
[...]
> +
> +static const struct of_device_id phy_berlin_sata_of_match[] = {
> + { .compatible = "marvell,berlin-sata-phy" },
s/marvell,berlin-sata-phy/marvell,berlin2-sata-phy/
and add
marvell,berlin2q-sata-phy
That way it can be applied now without proper support for BG2
and I can send patches later.
Sebastian
> + { },
> +};
> +
> +static struct platform_driver phy_berlin_sata_driver = {
> + .probe = phy_berlin_sata_probe,
> + .driver = {
> + .name = "phy-berlin-sata",
> + .owner = THIS_MODULE,
> + .of_match_table = phy_berlin_sata_of_match,
> + },
> +};
> +module_platform_driver(phy_berlin_sata_driver);
> +
> +MODULE_DESCRIPTION("Marvell Berlin SATA PHY driver");
> +MODULE_AUTHOR("Antoine Ténart <antoine.tenart@free-electrons.com>");
> +MODULE_LICENSE("GPL v2");
>
WARNING: multiple messages have this Message-ID (diff)
From: sebastian.hesselbarth@gmail.com (Sebastian Hesselbarth)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 1/7] phy: add a driver for the Berlin SATA PHY
Date: Tue, 17 Jun 2014 20:17:02 +0200 [thread overview]
Message-ID: <53A0861E.90400@gmail.com> (raw)
In-Reply-To: <1402914392-6028-2-git-send-email-antoine.tenart@free-electrons.com>
On 06/16/2014 12:26 PM, Antoine T?nart wrote:
> The Berlin SoC has a two SATA ports. Add a PHY driver to handle them.
>
> The mode selection can let us think this PHY can be configured to fit
> other purposes. But there are reasons to think the SATA mode will be
> the only one usable: the PHY registers are only accessible indirectly
> through two registers in the SATA range, the PHY seems to be integrated
> and no information tells us the contrary. For these reasons, make the
> driver a SATA PHY driver.
>
> Signed-off-by: Antoine T?nart <antoine.tenart@free-electrons.com>
> ---
[...]
> diff --git a/drivers/phy/phy-berlin-sata.c b/drivers/phy/phy-berlin-sata.c
> new file mode 100644
> index 000000000000..907897a02672
> --- /dev/null
> +++ b/drivers/phy/phy-berlin-sata.c
> @@ -0,0 +1,232 @@
> +/*
> + * Marvell Berlin SATA PHY driver
> + *
> + * Copyright (C) 2014 Marvell Technology Group Ltd.
> + *
> + * Antoine T?nart <antoine.tenart@free-electrons.com>
> + *
> + * This file is licensed under the terms of the GNU General Public
> + * License version 2. This program is licensed "as is" without any
> + * warranty of any kind, whether express or implied.
> + */
> +
> +#include <linux/module.h>
> +#include <linux/phy/phy.h>
> +#include <linux/io.h>
> +#include <linux/platform_device.h>
> +
> +#define HOST_VSA_ADDR 0x0
> +#define HOST_VSA_DATA 0x4
> +#define PORT_VSR_ADDR 0x78
> +#define PORT_VSR_DATA 0x7c
> +#define PORT_SCR_CTL 0x2c
> +
> +#define CONTROL_REGISTER 0x0
> +#define MBUS_SIZE_CONTROL 0x4
> +
> +#define POWER_DOWN_PHY0 BIT(6)
> +#define POWER_DOWN_PHY1 BIT(14)
> +#define MBUS_WRITE_REQUEST_SIZE_128 (BIT(2) << 16)
> +#define MBUS_READ_REQUEST_SIZE_128 (BIT(2) << 19)
> +
> +#define PHY_BASE 0x200
Antoine,
I gave your Berlin AHCI patches a try on BG2. I finally got it working
but BG2 has a different PHY_BASE and need some register fixups.
Please update this patch and the DT bindings to reflect the difference
of BG2Q with respect to BG2 as below.
[...]
> +
> +static const struct of_device_id phy_berlin_sata_of_match[] = {
> + { .compatible = "marvell,berlin-sata-phy" },
s/marvell,berlin-sata-phy/marvell,berlin2-sata-phy/
and add
marvell,berlin2q-sata-phy
That way it can be applied now without proper support for BG2
and I can send patches later.
Sebastian
> + { },
> +};
> +
> +static struct platform_driver phy_berlin_sata_driver = {
> + .probe = phy_berlin_sata_probe,
> + .driver = {
> + .name = "phy-berlin-sata",
> + .owner = THIS_MODULE,
> + .of_match_table = phy_berlin_sata_of_match,
> + },
> +};
> +module_platform_driver(phy_berlin_sata_driver);
> +
> +MODULE_DESCRIPTION("Marvell Berlin SATA PHY driver");
> +MODULE_AUTHOR("Antoine T?nart <antoine.tenart@free-electrons.com>");
> +MODULE_LICENSE("GPL v2");
>
WARNING: multiple messages have this Message-ID (diff)
From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
To: "Antoine Ténart" <antoine.tenart@free-electrons.com>,
tj@kernel.org, kishon@ti.com
Cc: alexandre.belloni@free-electrons.com,
thomas.petazzoni@free-electrons.com, zmxu@marvell.com,
jszhang@marvell.com, linux-arm-kernel@lists.infradead.org,
linux-ide@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 1/7] phy: add a driver for the Berlin SATA PHY
Date: Tue, 17 Jun 2014 20:17:02 +0200 [thread overview]
Message-ID: <53A0861E.90400@gmail.com> (raw)
In-Reply-To: <1402914392-6028-2-git-send-email-antoine.tenart@free-electrons.com>
On 06/16/2014 12:26 PM, Antoine Ténart wrote:
> The Berlin SoC has a two SATA ports. Add a PHY driver to handle them.
>
> The mode selection can let us think this PHY can be configured to fit
> other purposes. But there are reasons to think the SATA mode will be
> the only one usable: the PHY registers are only accessible indirectly
> through two registers in the SATA range, the PHY seems to be integrated
> and no information tells us the contrary. For these reasons, make the
> driver a SATA PHY driver.
>
> Signed-off-by: Antoine Ténart <antoine.tenart@free-electrons.com>
> ---
[...]
> diff --git a/drivers/phy/phy-berlin-sata.c b/drivers/phy/phy-berlin-sata.c
> new file mode 100644
> index 000000000000..907897a02672
> --- /dev/null
> +++ b/drivers/phy/phy-berlin-sata.c
> @@ -0,0 +1,232 @@
> +/*
> + * Marvell Berlin SATA PHY driver
> + *
> + * Copyright (C) 2014 Marvell Technology Group Ltd.
> + *
> + * Antoine Ténart <antoine.tenart@free-electrons.com>
> + *
> + * This file is licensed under the terms of the GNU General Public
> + * License version 2. This program is licensed "as is" without any
> + * warranty of any kind, whether express or implied.
> + */
> +
> +#include <linux/module.h>
> +#include <linux/phy/phy.h>
> +#include <linux/io.h>
> +#include <linux/platform_device.h>
> +
> +#define HOST_VSA_ADDR 0x0
> +#define HOST_VSA_DATA 0x4
> +#define PORT_VSR_ADDR 0x78
> +#define PORT_VSR_DATA 0x7c
> +#define PORT_SCR_CTL 0x2c
> +
> +#define CONTROL_REGISTER 0x0
> +#define MBUS_SIZE_CONTROL 0x4
> +
> +#define POWER_DOWN_PHY0 BIT(6)
> +#define POWER_DOWN_PHY1 BIT(14)
> +#define MBUS_WRITE_REQUEST_SIZE_128 (BIT(2) << 16)
> +#define MBUS_READ_REQUEST_SIZE_128 (BIT(2) << 19)
> +
> +#define PHY_BASE 0x200
Antoine,
I gave your Berlin AHCI patches a try on BG2. I finally got it working
but BG2 has a different PHY_BASE and need some register fixups.
Please update this patch and the DT bindings to reflect the difference
of BG2Q with respect to BG2 as below.
[...]
> +
> +static const struct of_device_id phy_berlin_sata_of_match[] = {
> + { .compatible = "marvell,berlin-sata-phy" },
s/marvell,berlin-sata-phy/marvell,berlin2-sata-phy/
and add
marvell,berlin2q-sata-phy
That way it can be applied now without proper support for BG2
and I can send patches later.
Sebastian
> + { },
> +};
> +
> +static struct platform_driver phy_berlin_sata_driver = {
> + .probe = phy_berlin_sata_probe,
> + .driver = {
> + .name = "phy-berlin-sata",
> + .owner = THIS_MODULE,
> + .of_match_table = phy_berlin_sata_of_match,
> + },
> +};
> +module_platform_driver(phy_berlin_sata_driver);
> +
> +MODULE_DESCRIPTION("Marvell Berlin SATA PHY driver");
> +MODULE_AUTHOR("Antoine Ténart <antoine.tenart@free-electrons.com>");
> +MODULE_LICENSE("GPL v2");
>
next prev parent reply other threads:[~2014-06-17 18:17 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-16 10:26 [PATCH v6 0/7] ARM: berlin: add AHCI support Antoine Ténart
2014-06-16 10:26 ` Antoine Ténart
2014-06-16 10:26 ` [PATCH v6 2/7] Documentation: bindings: add the Berlin SATA PHY Antoine Ténart
2014-06-16 10:26 ` Antoine Ténart
2014-06-16 10:26 ` [PATCH v6 3/7] ata: libahci: allow to use multiple PHYs Antoine Ténart
2014-06-16 10:26 ` Antoine Ténart
2014-06-16 10:26 ` [PATCH v6 4/7] ata: ahci_platform: add a generic AHCI compatible Antoine Ténart
2014-06-16 10:26 ` Antoine Ténart
2014-06-16 10:26 ` [PATCH v6 5/7] Documentation: bindings: document the sub-nodes AHCI bindings Antoine Ténart
2014-06-16 10:26 ` Antoine Ténart
2014-06-16 10:26 ` [PATCH v6 6/7] ARM: berlin: add the AHCI node for the BG2Q Antoine Ténart
2014-06-16 10:26 ` Antoine Ténart
2014-06-16 10:44 ` Sebastian Hesselbarth
2014-06-16 10:44 ` Sebastian Hesselbarth
2014-06-16 10:44 ` Sebastian Hesselbarth
2014-06-16 10:26 ` [PATCH v6 7/7] ARM: berlin: enable the eSATA interface on the BG2Q DMP Antoine Ténart
2014-06-16 10:26 ` Antoine Ténart
[not found] ` <1402914392-6028-1-git-send-email-antoine.tenart-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-06-16 10:26 ` [PATCH v6 1/7] phy: add a driver for the Berlin SATA PHY Antoine Ténart
2014-06-16 10:26 ` Antoine Ténart
2014-06-16 10:26 ` Antoine Ténart
2014-06-17 18:17 ` Sebastian Hesselbarth [this message]
2014-06-17 18:17 ` Sebastian Hesselbarth
2014-06-17 18:17 ` Sebastian Hesselbarth
2014-06-23 13:05 ` Antoine Ténart
2014-06-23 13:05 ` Antoine Ténart
2014-06-23 13:05 ` Antoine Ténart
2014-06-24 12:00 ` Kishon Vijay Abraham I
2014-06-24 12:00 ` Kishon Vijay Abraham I
2014-06-24 12:00 ` Kishon Vijay Abraham I
2014-06-24 12:07 ` Varka Bhadram
2014-06-24 12:07 ` Varka Bhadram
2014-06-24 12:15 ` Lee Jones
2014-06-24 12:15 ` Lee Jones
2014-06-24 12:22 ` Varka Bhadram
2014-06-24 12:22 ` Varka Bhadram
2014-06-24 12:22 ` Varka Bhadram
2014-06-24 12:39 ` Lee Jones
2014-06-24 12:39 ` Lee Jones
2014-06-30 10:20 ` Antoine Ténart
2014-06-30 10:20 ` Antoine Ténart
2014-06-16 10:46 ` [PATCH v6 0/7] ARM: berlin: add AHCI support Sebastian Hesselbarth
2014-06-16 10:46 ` Sebastian Hesselbarth
2014-06-16 10:46 ` Sebastian Hesselbarth
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=53A0861E.90400@gmail.com \
--to=sebastian.hesselbarth@gmail.com \
--cc=alexandre.belloni@free-electrons.com \
--cc=antoine.tenart@free-electrons.com \
--cc=devicetree@vger.kernel.org \
--cc=jszhang@marvell.com \
--cc=kishon@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=thomas.petazzoni@free-electrons.com \
--cc=tj@kernel.org \
--cc=zmxu@marvell.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.