Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1675873 > unrolled thread
| Started by | Al Cooper <alcooperx@gmail.com> |
|---|---|
| First post | 2017-06-27 17:10 +0200 |
| Last post | 2017-06-27 17:10 +0200 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v3 0/4] Add Broadcom STB USB phy driver Al Cooper <alcooperx@gmail.com> - 2017-06-27 17:10 +0200
[PATCH v3 1/4] soc: brcmstb: Add Product ID and Family ID helper functions Al Cooper <alcooperx@gmail.com> - 2017-06-27 17:10 +0200
Re: [PATCH v3 1/4] soc: brcmstb: Add Product ID and Family ID helper functions Florian Fainelli <f.fainelli@gmail.com> - 2017-06-27 21:00 +0200
[PATCH v3 2/4] dt-bindings: Add Broadcom STB USB PHY binding document Al Cooper <alcooperx@gmail.com> - 2017-06-27 17:10 +0200
| From | Al Cooper <alcooperx@gmail.com> |
|---|---|
| Date | 2017-06-27 17:10 +0200 |
| Subject | [PATCH v3 0/4] Add Broadcom STB USB phy driver |
| Message-ID | <tX0hP-2f9-9@gated-at.bofh.it> |
Add a new USB Phy driver for Broadcom STB SoCs. This driver
supports Broadcom STB ARM and MIPS SoCs. This driver in
combination with the Broadcom STB ohci, ehci and xhci
drivers will enable USB1.1, USB2.0 and USB3.0 support.
This Phy driver also supports the Broadcom UDC gadget
driver.
Changes since v2:
- Fix kbuild errors by changing Kconfig so the driver
only builds for ARCH_BRCMSTB || BMIPS_GENERIC systems
Changes since v1:
- Rebased to next
- Add Kconfig entry to build the driver
- Commented all delays
- Split out sysfs functionality in separate patch
- Removed parsing of old obselete device tree properties
- Changed device property "device" to "dr_mode" using
standard values "host" and "peripheral" along with new
values "drd" and "typec-pd"
- Add ability to handle the standard PHY_TYPE_USB2 and
PHY_TYPE_USB3 arguments passed in by phy consumers.
- Moved phy_provider_register() to end of probe routine
Al Cooper (4):
soc: brcmstb: Add Product ID and Family ID helper functions
dt-bindings: Add Broadcom STB USB PHY binding document
phy: usb: phy-brcm-usb: Add Broadcom STB USB phy driver
phy: usb: phy-brcm-usb: Add ability to force DRD mode to host or
device
.../bindings/phy/brcm,brcmstb-usb-phy.txt | 42 +
MAINTAINERS | 7 +
drivers/phy/broadcom/Kconfig | 12 +
drivers/phy/broadcom/Makefile | 3 +
drivers/phy/broadcom/phy-brcm-usb-init.c | 1125 ++++++++++++++++++++
drivers/phy/broadcom/phy-brcm-usb-init.h | 95 ++
drivers/phy/broadcom/phy-brcm-usb.c | 444 ++++++++
drivers/soc/bcm/brcmstb/common.c | 12 +
include/linux/soc/brcmstb/brcmstb.h | 10 +
9 files changed, 1750 insertions(+)
create mode 100644 Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.txt
create mode 100644 drivers/phy/broadcom/phy-brcm-usb-init.c
create mode 100644 drivers/phy/broadcom/phy-brcm-usb-init.h
create mode 100644 drivers/phy/broadcom/phy-brcm-usb.c
--
1.9.0.138.g2de3478
[toc] | [next] | [standalone]
| From | Al Cooper <alcooperx@gmail.com> |
|---|---|
| Date | 2017-06-27 17:10 +0200 |
| Subject | [PATCH v3 1/4] soc: brcmstb: Add Product ID and Family ID helper functions |
| Message-ID | <tX0hP-2f9-19@gated-at.bofh.it> |
| In reply to | #1675873 |
Signed-off-by: Al Cooper <alcooperx@gmail.com>
---
drivers/soc/bcm/brcmstb/common.c | 12 ++++++++++++
include/linux/soc/brcmstb/brcmstb.h | 10 ++++++++++
2 files changed, 22 insertions(+)
diff --git a/drivers/soc/bcm/brcmstb/common.c b/drivers/soc/bcm/brcmstb/common.c
index b6195fd..184dbf5 100644
--- a/drivers/soc/bcm/brcmstb/common.c
+++ b/drivers/soc/bcm/brcmstb/common.c
@@ -40,6 +40,18 @@ bool soc_is_brcmstb(void)
return of_match_node(brcmstb_machine_match, root) != NULL;
}
+u32 brcmstb_get_family_id(void)
+{
+ return family_id;
+}
+EXPORT_SYMBOL(brcmstb_get_family_id);
+
+u32 brcmstb_get_product_id(void)
+{
+ return product_id;
+}
+EXPORT_SYMBOL(brcmstb_get_product_id);
+
static const struct of_device_id sun_top_ctrl_match[] = {
{ .compatible = "brcm,bcm7125-sun-top-ctrl", },
{ .compatible = "brcm,bcm7346-sun-top-ctrl", },
diff --git a/include/linux/soc/brcmstb/brcmstb.h b/include/linux/soc/brcmstb/brcmstb.h
index 337ce41..23e4dc9 100644
--- a/include/linux/soc/brcmstb/brcmstb.h
+++ b/include/linux/soc/brcmstb/brcmstb.h
@@ -1,10 +1,20 @@
#ifndef __BRCMSTB_SOC_H
#define __BRCMSTB_SOC_H
+#define BRCM_ID(reg) ((u32)reg >> 28 ? (u32)reg >> 16 : (u32)reg >> 8)
+#define BRCM_REV(reg) ((u32)reg & 0xff)
+
/*
* Bus Interface Unit control register setup, must happen early during boot,
* before SMP is brought up, called by machine entry point.
*/
void brcmstb_biuctrl_init(void);
+/*
+ * Helper functions for getting family or product id from the
+ * SoC driver.
+ */
+u32 brcmstb_get_family_id(void);
+u32 brcmstb_get_product_id(void);
+
#endif /* __BRCMSTB_SOC_H */
--
1.9.0.138.g2de3478
[toc] | [prev] | [next] | [standalone]
| From | Florian Fainelli <f.fainelli@gmail.com> |
|---|---|
| Date | 2017-06-27 21:00 +0200 |
| Subject | Re: [PATCH v3 1/4] soc: brcmstb: Add Product ID and Family ID helper functions |
| Message-ID | <tX3Sq-4wL-11@gated-at.bofh.it> |
| In reply to | #1675874 |
On 06/27/2017 07:59 AM, Al Cooper wrote:
> Signed-off-by: Al Cooper <alcooperx@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Kishon, feel free to merge that through your tree. Thanks!
> ---
> drivers/soc/bcm/brcmstb/common.c | 12 ++++++++++++
> include/linux/soc/brcmstb/brcmstb.h | 10 ++++++++++
> 2 files changed, 22 insertions(+)
>
> diff --git a/drivers/soc/bcm/brcmstb/common.c b/drivers/soc/bcm/brcmstb/common.c
> index b6195fd..184dbf5 100644
> --- a/drivers/soc/bcm/brcmstb/common.c
> +++ b/drivers/soc/bcm/brcmstb/common.c
> @@ -40,6 +40,18 @@ bool soc_is_brcmstb(void)
> return of_match_node(brcmstb_machine_match, root) != NULL;
> }
>
> +u32 brcmstb_get_family_id(void)
> +{
> + return family_id;
> +}
> +EXPORT_SYMBOL(brcmstb_get_family_id);
> +
> +u32 brcmstb_get_product_id(void)
> +{
> + return product_id;
> +}
> +EXPORT_SYMBOL(brcmstb_get_product_id);
> +
> static const struct of_device_id sun_top_ctrl_match[] = {
> { .compatible = "brcm,bcm7125-sun-top-ctrl", },
> { .compatible = "brcm,bcm7346-sun-top-ctrl", },
> diff --git a/include/linux/soc/brcmstb/brcmstb.h b/include/linux/soc/brcmstb/brcmstb.h
> index 337ce41..23e4dc9 100644
> --- a/include/linux/soc/brcmstb/brcmstb.h
> +++ b/include/linux/soc/brcmstb/brcmstb.h
> @@ -1,10 +1,20 @@
> #ifndef __BRCMSTB_SOC_H
> #define __BRCMSTB_SOC_H
>
> +#define BRCM_ID(reg) ((u32)reg >> 28 ? (u32)reg >> 16 : (u32)reg >> 8)
> +#define BRCM_REV(reg) ((u32)reg & 0xff)
> +
> /*
> * Bus Interface Unit control register setup, must happen early during boot,
> * before SMP is brought up, called by machine entry point.
> */
> void brcmstb_biuctrl_init(void);
>
> +/*
> + * Helper functions for getting family or product id from the
> + * SoC driver.
> + */
> +u32 brcmstb_get_family_id(void);
> +u32 brcmstb_get_product_id(void);
> +
> #endif /* __BRCMSTB_SOC_H */
>
--
Florian
[toc] | [prev] | [next] | [standalone]
| From | Al Cooper <alcooperx@gmail.com> |
|---|---|
| Date | 2017-06-27 17:10 +0200 |
| Subject | [PATCH v3 2/4] dt-bindings: Add Broadcom STB USB PHY binding document |
| Message-ID | <tX0hQ-2f9-29@gated-at.bofh.it> |
| In reply to | #1675873 |
Add DT bindings document for Broadcom STB USB PHYs
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Al Cooper <alcooperx@gmail.com>
---
.../bindings/phy/brcm,brcmstb-usb-phy.txt | 42 ++++++++++++++++++++++
1 file changed, 42 insertions(+)
create mode 100644 Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.txt
diff --git a/Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.txt b/Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.txt
new file mode 100644
index 0000000..bde0f5f
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.txt
@@ -0,0 +1,42 @@
+Broadcom STB USB PHY
+
+Required properties:
+ - compatible: brcm,brcmstb-usb-phy
+ - reg: two offset and length pairs.
+ The first pair specifies a manditory set of memory mapped
+ registers used for general control of the PHY.
+ The second pair specifies optional registers used by some of
+ the SoCs that support USB 3.x
+ - #phy-cells: Shall be 1 as it expects one argument for setting
+ the type of the PHY. Possible values are:
+ - PHY_TYPE_USB2 for USB1.1/2.0 PHY
+ - PHY_TYPE_USB3 for USB3.x PHY
+
+Optional Properties:
+- clocks : clock phandles.
+- clock-names: String, clock name.
+- brcm,ipp: Boolean, Invert Port Power.
+ Possible values are: 0 (Don't invert), 1 (Invert)
+- brcm,ioc: Boolean, Invert Over Current detection.
+ Possible values are: 0 (Don't invert), 1 (Invert)
+- brcm,has-xhci: Boolean indicating an optional 3.x only XHCI controller.
+- brcm,has-xhci-only: Boolean indicating an XHCI controller that supports
+ 1.1, 2.0 and 3.0 devices
+- dr_mode: String, PHY Device mode.
+ Possible values are: "host", "peripheral ", "drd" or "typec-pd"
+ If this property is not defined, the phy will default to "host" mode.
+
+Example:
+
+usbphy_0: usb-phy@f0470200 {
+ reg = <0xf0470200 0xb8>,
+ <0xf0471940 0x6c0>;
+ compatible = "brcm,brcmstb-usb-phy";
+ #phy-cells = <1>;
+ dr_mode = "host"
+ brcm,ioc = <1>;
+ brcm,ipp = <1>;
+ brcm,has-xhci;
+ clocks = <&usb20>, <&usb30>;
+ clock-names = "sw_usb", "sw_usb3";
+};
--
1.9.0.138.g2de3478
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web