Re: [PATCH 6/6] phy: amlogic: meson8b-usb2: Add a compatible string for Meson8m2

2020-05-04 Thread hex dump
On Sat, May 2, 2020 at 1:48 PM Martin Blumenstingl
 wrote:
>
> The 3.10 vendor kernel sets the ACA_ENABLE bit on Meson8b, Meson8m2 and
> GXBB, but not on Meson8. Add a compatible string for Meson8m2 which also
> sets that bit.
> While here, also update the Kconfig text and MODULE_DESCRIPTION.
>
> Signed-off-by: Martin Blumenstingl 

Tested-by: hexdump 

> ---
>  drivers/phy/amlogic/Kconfig| 2 +-
>  drivers/phy/amlogic/phy-meson8b-usb2.c | 6 +-
>  2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/phy/amlogic/Kconfig b/drivers/phy/amlogic/Kconfig
> index 3495b23af797..5ec53874d1ea 100644
> --- a/drivers/phy/amlogic/Kconfig
> +++ b/drivers/phy/amlogic/Kconfig
> @@ -3,7 +3,7 @@
>  # Phy drivers for Amlogic platforms
>  #
>  config PHY_MESON8B_USB2
> -   tristate "Meson8, Meson8b and GXBB USB2 PHY driver"
> +   tristate "Meson8, Meson8b, Meson8m2 and GXBB USB2 PHY driver"
> default ARCH_MESON
> depends on OF && (ARCH_MESON || COMPILE_TEST)
> depends on USB_SUPPORT
> diff --git a/drivers/phy/amlogic/phy-meson8b-usb2.c 
> b/drivers/phy/amlogic/phy-meson8b-usb2.c
> index 436dfa1a8a04..03c061dd5f0d 100644
> --- a/drivers/phy/amlogic/phy-meson8b-usb2.c
> +++ b/drivers/phy/amlogic/phy-meson8b-usb2.c
> @@ -302,6 +302,10 @@ static const struct of_device_id 
> phy_meson8b_usb2_of_match[] = {
> .compatible = "amlogic,meson8b-usb2-phy",
> .data = &phy_meson8b_usb2_match_data
> },
> +   {
> +   .compatible = "amlogic,meson8m2-usb2-phy",
> +   .data = &phy_meson8b_usb2_match_data
> +   },
> {
> .compatible = "amlogic,meson-gxbb-usb2-phy",
> .data = &phy_meson8b_usb2_match_data
> @@ -320,5 +324,5 @@ static struct platform_driver phy_meson8b_usb2_driver = {
>  module_platform_driver(phy_meson8b_usb2_driver);
>
>  MODULE_AUTHOR("Martin Blumenstingl ");
> -MODULE_DESCRIPTION("Meson8, Meson8b and GXBB USB2 PHY driver");
> +MODULE_DESCRIPTION("Meson8, Meson8b, Meson8m2 and GXBB USB2 PHY driver");
>  MODULE_LICENSE("GPL");
> --
> 2.26.2
>


Re: [PATCH 5/6] phy: amlogic: meson8b-usb2: unset the IDDQ bit during PHY power-on

2020-05-04 Thread hex dump
On Sat, May 2, 2020 at 1:48 PM Martin Blumenstingl
 wrote:
>
> The vendor driver unsets the set_iddig bit during power-on as well and
> sets it when suspending the PHY. I did not notice this in the vendor
> driver first, because it's part of the dwc_otg driver there (instead of
> their PHY code). While here, also add all other REG_DBG_UART register
> bit definitions.
>
> Signed-off-by: Martin Blumenstingl 

Tested-by: hexdump 

> ---
>  drivers/phy/amlogic/phy-meson8b-usb2.c | 44 +++---
>  1 file changed, 32 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/phy/amlogic/phy-meson8b-usb2.c 
> b/drivers/phy/amlogic/phy-meson8b-usb2.c
> index 7236b8885f07..436dfa1a8a04 100644
> --- a/drivers/phy/amlogic/phy-meson8b-usb2.c
> +++ b/drivers/phy/amlogic/phy-meson8b-usb2.c
> @@ -78,6 +78,17 @@
> #define REG_ADP_BC_ACA_PIN_FLOATBIT(26)
>
>  #define REG_DBG_UART   0x10
> +   #define REG_DBG_UART_BYPASS_SEL BIT(0)
> +   #define REG_DBG_UART_BYPASS_DM_EN   BIT(1)
> +   #define REG_DBG_UART_BYPASS_DP_EN   BIT(2)
> +   #define REG_DBG_UART_BYPASS_DM_DATA BIT(3)
> +   #define REG_DBG_UART_BYPASS_DP_DATA BIT(4)
> +   #define REG_DBG_UART_FSV_MINUS  BIT(5)
> +   #define REG_DBG_UART_FSV_PLUS   BIT(6)
> +   #define REG_DBG_UART_FSV_BURN_IN_TEST   BIT(7)
> +   #define REG_DBG_UART_LOOPBACK_EN_B  BIT(8)
> +   #define REG_DBG_UART_SET_IDDQ   BIT(9)
> +   #define REG_DBG_UART_ATE_RESET  BIT(10)
>
>  #define REG_TEST   0x14
> #define REG_TEST_DATA_IN_MASK   GENMASK(3, 0)
> @@ -172,20 +183,24 @@ static int phy_meson8b_usb2_power_on(struct phy *phy)
> regmap_update_bits(priv->regmap, REG_CTRL, REG_CTRL_SOF_TOGGLE_OUT,
>REG_CTRL_SOF_TOGGLE_OUT);
>
> -   if (priv->dr_mode == USB_DR_MODE_HOST &&
> -   priv->match->host_enable_aca) {
> -   regmap_update_bits(priv->regmap, REG_ADP_BC,
> -  REG_ADP_BC_ACA_ENABLE,
> -  REG_ADP_BC_ACA_ENABLE);
> +   if (priv->dr_mode == USB_DR_MODE_HOST) {
> +   regmap_update_bits(priv->regmap, REG_DBG_UART,
> +  REG_DBG_UART_SET_IDDQ, 0);
>
> -   udelay(ACA_ENABLE_COMPLETE_TIME);
> +   if (priv->match->host_enable_aca) {
> +   regmap_update_bits(priv->regmap, REG_ADP_BC,
> +  REG_ADP_BC_ACA_ENABLE,
> +  REG_ADP_BC_ACA_ENABLE);
>
> -   regmap_read(priv->regmap, REG_ADP_BC, ®);
> -   if (reg & REG_ADP_BC_ACA_PIN_FLOAT) {
> -   dev_warn(&phy->dev, "USB ID detect failed!\n");
> -   clk_disable_unprepare(priv->clk_usb);
> -   clk_disable_unprepare(priv->clk_usb_general);
> -   return -EINVAL;
> +   udelay(ACA_ENABLE_COMPLETE_TIME);
> +
> +   regmap_read(priv->regmap, REG_ADP_BC, ®);
> +   if (reg & REG_ADP_BC_ACA_PIN_FLOAT) {
> +   dev_warn(&phy->dev, "USB ID detect 
> failed!\n");
> +   clk_disable_unprepare(priv->clk_usb);
> +   clk_disable_unprepare(priv->clk_usb_general);
> +   return -EINVAL;
> +   }
> }
> }
>
> @@ -196,6 +211,11 @@ static int phy_meson8b_usb2_power_off(struct phy *phy)
>  {
> struct phy_meson8b_usb2_priv *priv = phy_get_drvdata(phy);
>
> +   if (priv->dr_mode == USB_DR_MODE_HOST)
> +   regmap_update_bits(priv->regmap, REG_DBG_UART,
> +  REG_DBG_UART_SET_IDDQ,
> +  REG_DBG_UART_SET_IDDQ);
> +
> clk_disable_unprepare(priv->clk_usb);
> clk_disable_unprepare(priv->clk_usb_general);
>
> --
> 2.26.2
>


Re: [PATCH 4/6] phy: amlogic: meson8b-usb2: Don't set REG_ADP_BC_ACA_ENABLE on Meson8

2020-05-04 Thread hex dump
On Sat, May 2, 2020 at 1:48 PM Martin Blumenstingl
 wrote:
>
> Skip setting REG_ADP_BC_ACA_ENABLE on Meson8 SoCs and polling for the
> REG_ADP_BC_ACA_PIN_FLOAT bit. The vendor also skips this part on Meson8
> SoCs.
> This fixes initialization of the host-only USB PHY on Meson8 which would
> otherwise fail with "USB ID detect failed!".
>
> Fixes: 4a3449d1a0a10c ("phy: meson8b-usb2: add support for the USB PHY on 
> Meson8 SoCs")
> Reported-by: hexdump 
> Signed-off-by: Martin Blumenstingl 

Tested-by: hexdump 

BEFORE: usb failed with:
[3.451386] dwc2 c904.usb: c904.usb supply vusb_d not
found, using dummy regulator
[3.454097] dwc2 c904.usb: c904.usb supply vusb_a not
found, using dummy regulator
[3.463602] phy phy-c1108800.phy.0: USB ID detect failed!
[3.467646] phy phy-c1108800.phy.0: phy poweron failed --> -22

AFTER: usb is detected and working fine on my mx meson8 box

> ---
>  drivers/phy/amlogic/phy-meson8b-usb2.c | 48 --
>  1 file changed, 38 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/phy/amlogic/phy-meson8b-usb2.c 
> b/drivers/phy/amlogic/phy-meson8b-usb2.c
> index 86824cc21f11..7236b8885f07 100644
> --- a/drivers/phy/amlogic/phy-meson8b-usb2.c
> +++ b/drivers/phy/amlogic/phy-meson8b-usb2.c
> @@ -10,6 +10,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -105,12 +106,17 @@
>  #define RESET_COMPLETE_TIME500
>  #define ACA_ENABLE_COMPLETE_TIME   50
>
> +struct phy_meson8b_usb2_match_data {
> +   boolhost_enable_aca;
> +};
> +
>  struct phy_meson8b_usb2_priv {
> -   struct regmap   *regmap;
> -   enum usb_dr_modedr_mode;
> -   struct clk  *clk_usb_general;
> -   struct clk  *clk_usb;
> -   struct reset_control*reset;
> +   struct regmap   *regmap;
> +   enum usb_dr_modedr_mode;
> +   struct clk  *clk_usb_general;
> +   struct clk  *clk_usb;
> +   struct reset_control*reset;
> +   const struct phy_meson8b_usb2_match_data*match;
>  };
>
>  static const struct regmap_config phy_meson8b_usb2_regmap_conf = {
> @@ -166,7 +172,8 @@ static int phy_meson8b_usb2_power_on(struct phy *phy)
> regmap_update_bits(priv->regmap, REG_CTRL, REG_CTRL_SOF_TOGGLE_OUT,
>REG_CTRL_SOF_TOGGLE_OUT);
>
> -   if (priv->dr_mode == USB_DR_MODE_HOST) {
> +   if (priv->dr_mode == USB_DR_MODE_HOST &&
> +   priv->match->host_enable_aca) {
> regmap_update_bits(priv->regmap, REG_ADP_BC,
>REG_ADP_BC_ACA_ENABLE,
>REG_ADP_BC_ACA_ENABLE);
> @@ -216,6 +223,10 @@ static int phy_meson8b_usb2_probe(struct platform_device 
> *pdev)
> if (IS_ERR(base))
> return PTR_ERR(base);
>
> +   priv->match = device_get_match_data(&pdev->dev);
> +   if (!priv->match)
> +   return -ENODEV;
> +
> priv->regmap = devm_regmap_init_mmio(&pdev->dev, base,
>  &phy_meson8b_usb2_regmap_conf);
> if (IS_ERR(priv->regmap))
> @@ -254,11 +265,28 @@ static int phy_meson8b_usb2_probe(struct 
> platform_device *pdev)
> return PTR_ERR_OR_ZERO(phy_provider);
>  }
>
> +static const struct phy_meson8b_usb2_match_data phy_meson8_usb2_match_data = 
> {
> +   .host_enable_aca = false,
> +};
> +
> +static const struct phy_meson8b_usb2_match_data phy_meson8b_usb2_match_data 
> = {
> +   .host_enable_aca = true,
> +};
> +
>  static const struct of_device_id phy_meson8b_usb2_of_match[] = {
> -   { .compatible = "amlogic,meson8-usb2-phy", },
> -   { .compatible = "amlogic,meson8b-usb2-phy", },
> -   { .compatible = "amlogic,meson-gxbb-usb2-phy", },
> -   { },
> +   {
> +   .compatible = "amlogic,meson8-usb2-phy",
> +   .data = &phy_meson8_usb2_match_data
> +   },
> +   {
> +   .compatible = "amlogic,meson8b-usb2-phy",
> +   .data = &phy_meson8b_usb2_match_data
> +   },
> +   {
> +   .compatible = "amlogic,meson-gxbb-usb2-phy",
> +   .data = &phy_meson8b_usb2_match_data
> +   },
> +   { /* sentinel */ }
>  };
>  MODULE_DEVICE_TABLE(of, phy_meson8b_usb2_of_match);
>
> --
> 2.26.2
>


Re: [PATCH 3/6] phy: amlogic: meson8b-usb2: Use a MMIO regmap

2020-05-04 Thread hex dump
On Sat, May 2, 2020 at 1:48 PM Martin Blumenstingl
 wrote:
>
> Using a MMIO regmap and switch to regmap_update_bits() to simplify the
> code in the driver. Also switch to devm_platform_ioremap_resource()
> instead of open-coding it. No functional changes intended.
>
> Signed-off-by: Martin Blumenstingl 

Tested-by: hexdump 

> ---
>  drivers/phy/amlogic/Kconfig|  1 +
>  drivers/phy/amlogic/phy-meson8b-usb2.c | 73 --
>  2 files changed, 35 insertions(+), 39 deletions(-)
>
> diff --git a/drivers/phy/amlogic/Kconfig b/drivers/phy/amlogic/Kconfig
> index 71801e30d601..3495b23af797 100644
> --- a/drivers/phy/amlogic/Kconfig
> +++ b/drivers/phy/amlogic/Kconfig
> @@ -9,6 +9,7 @@ config PHY_MESON8B_USB2
> depends on USB_SUPPORT
> select USB_COMMON
> select GENERIC_PHY
> +   select REGMAP_MMIO
> help
>   Enable this to support the Meson USB2 PHYs found in Meson8,
>   Meson8b and GXBB SoCs.
> diff --git a/drivers/phy/amlogic/phy-meson8b-usb2.c 
> b/drivers/phy/amlogic/phy-meson8b-usb2.c
> index bd66bd723e4a..86824cc21f11 100644
> --- a/drivers/phy/amlogic/phy-meson8b-usb2.c
> +++ b/drivers/phy/amlogic/phy-meson8b-usb2.c
> @@ -10,6 +10,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -105,34 +106,24 @@
>  #define ACA_ENABLE_COMPLETE_TIME   50
>
>  struct phy_meson8b_usb2_priv {
> -   void __iomem*regs;
> +   struct regmap   *regmap;
> enum usb_dr_modedr_mode;
> struct clk  *clk_usb_general;
> struct clk  *clk_usb;
> struct reset_control*reset;
>  };
>
> -static u32 phy_meson8b_usb2_read(struct phy_meson8b_usb2_priv *phy_priv,
> -u32 reg)
> -{
> -   return readl(phy_priv->regs + reg);
> -}
> -
> -static void phy_meson8b_usb2_mask_bits(struct phy_meson8b_usb2_priv 
> *phy_priv,
> -  u32 reg, u32 mask, u32 value)
> -{
> -   u32 data;
> -
> -   data = phy_meson8b_usb2_read(phy_priv, reg);
> -   data &= ~mask;
> -   data |= (value & mask);
> -
> -   writel(data, phy_priv->regs + reg);
> -}
> +static const struct regmap_config phy_meson8b_usb2_regmap_conf = {
> +   .reg_bits = 8,
> +   .val_bits = 32,
> +   .reg_stride = 4,
> +   .max_register = REG_TUNE,
> +};
>
>  static int phy_meson8b_usb2_power_on(struct phy *phy)
>  {
> struct phy_meson8b_usb2_priv *priv = phy_get_drvdata(phy);
> +   u32 reg;
> int ret;
>
> if (!IS_ERR_OR_NULL(priv->reset)) {
> @@ -156,34 +147,34 @@ static int phy_meson8b_usb2_power_on(struct phy *phy)
> return ret;
> }
>
> -   phy_meson8b_usb2_mask_bits(priv, REG_CONFIG, 
> REG_CONFIG_CLK_32k_ALTSEL,
> -  REG_CONFIG_CLK_32k_ALTSEL);
> +   regmap_update_bits(priv->regmap, REG_CONFIG, 
> REG_CONFIG_CLK_32k_ALTSEL,
> +  REG_CONFIG_CLK_32k_ALTSEL);
>
> -   phy_meson8b_usb2_mask_bits(priv, REG_CTRL, REG_CTRL_REF_CLK_SEL_MASK,
> -  0x2 << REG_CTRL_REF_CLK_SEL_SHIFT);
> +   regmap_update_bits(priv->regmap, REG_CTRL, REG_CTRL_REF_CLK_SEL_MASK,
> +  0x2 << REG_CTRL_REF_CLK_SEL_SHIFT);
>
> -   phy_meson8b_usb2_mask_bits(priv, REG_CTRL, REG_CTRL_FSEL_MASK,
> -  0x5 << REG_CTRL_FSEL_SHIFT);
> +   regmap_update_bits(priv->regmap, REG_CTRL, REG_CTRL_FSEL_MASK,
> +  0x5 << REG_CTRL_FSEL_SHIFT);
>
> /* reset the PHY */
> -   phy_meson8b_usb2_mask_bits(priv, REG_CTRL, REG_CTRL_POWER_ON_RESET,
> -  REG_CTRL_POWER_ON_RESET);
> +   regmap_update_bits(priv->regmap, REG_CTRL, REG_CTRL_POWER_ON_RESET,
> +  REG_CTRL_POWER_ON_RESET);
> udelay(RESET_COMPLETE_TIME);
> -   phy_meson8b_usb2_mask_bits(priv, REG_CTRL, REG_CTRL_POWER_ON_RESET, 
> 0);
> +   regmap_update_bits(priv->regmap, REG_CTRL, REG_CTRL_POWER_ON_RESET, 
> 0);
> udelay(RESET_COMPLETE_TIME);
>
> -   phy_meson8b_usb2_mask_bits(priv, REG_CTRL, REG_CTRL_SOF_TOGGLE_OUT,
> -  REG_CTRL_SOF_TOGGLE_OUT);
> +   regmap_update_bits(priv->regmap, REG_CTRL, REG_CTRL_SOF_TOGGLE_OUT,
> +  REG_CTRL_SOF_TOGGLE_OUT);
>
> if (priv->dr_mode == USB_DR_MODE_HOST) {
> -   phy_meson8b_usb2_mask_bits(priv, REG_ADP_BC,
> -  REG_ADP_BC_ACA_ENABLE,
> -  REG_ADP_BC_ACA_ENABLE);
> +   regmap_update_bits(priv->regmap, REG_ADP_BC,
> +  REG_ADP_BC_ACA_ENABLE,
> +  REG_ADP_BC_ACA_ENABLE);
>
> udelay(ACA_ENABLE_COMPLETE_TIME);
>
> -   if (phy_

Re: [PATCH 2/6] dt-bindings: phy: meson8b-usb2: Add compatible string for Meson8m2

2020-05-04 Thread hex dump
On Sat, May 2, 2020 at 1:48 PM Martin Blumenstingl
 wrote:
>
> The USB2 PHY on Meson8m2 is identical to the one on Meson8b but
> different to the one on Meson8. The only known difference is that Meson8
> does not set the ACA_ENABLE bit while Meson8b and Meson8m2 do.
> Add an explicit compatible string for Meson8m2 so those differences can
> be taken care of.
>
> Signed-off-by: Martin Blumenstingl 

Tested-by: hexdump 

> ---
>  .../devicetree/bindings/phy/amlogic,meson8b-usb2-phy.yaml| 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git 
> a/Documentation/devicetree/bindings/phy/amlogic,meson8b-usb2-phy.yaml 
> b/Documentation/devicetree/bindings/phy/amlogic,meson8b-usb2-phy.yaml
> index c2fe8c08d99e..1d402e055045 100644
> --- a/Documentation/devicetree/bindings/phy/amlogic,meson8b-usb2-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/amlogic,meson8b-usb2-phy.yaml
> @@ -16,6 +16,7 @@ properties:
>- enum:
>  - amlogic,meson8-usb2-phy
>  - amlogic,meson8b-usb2-phy
> +- amlogic,meson8m2-usb2-phy
>- const: amlogic,meson-mx-usb2-phy
>- const: amlogic,meson-gxbb-usb2-phy
>
> --
> 2.26.2
>


Re: [PATCH 1/6] dt-bindings: phy: meson8b-usb2: Convert to json-schema

2020-05-04 Thread hex dump
On Sat, May 2, 2020 at 1:48 PM Martin Blumenstingl
 wrote:
>
> Now that we have the DT validation in place, let's convert the device
> tree bindings for the Amlogic Meson8, Meson8b, Meson8m2 and GXBB USB2
> PHY over to a YAML schema.
>
> While here, also add the fallback compatible string
> "amlogic,meson-gxbb-usb2-phy" which is already used in
> arch/arm/boot/dts/meson{,8,8b}.dtsi.
>
> Signed-off-by: Martin Blumenstingl 

Tested-by: hexdump 

> ---
>  .../phy/amlogic,meson8b-usb2-phy.yaml | 61 +++
>  .../bindings/phy/meson8b-usb2-phy.txt | 28 -
>  2 files changed, 61 insertions(+), 28 deletions(-)
>  create mode 100644 
> Documentation/devicetree/bindings/phy/amlogic,meson8b-usb2-phy.yaml
>  delete mode 100644 Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt
>
> diff --git 
> a/Documentation/devicetree/bindings/phy/amlogic,meson8b-usb2-phy.yaml 
> b/Documentation/devicetree/bindings/phy/amlogic,meson8b-usb2-phy.yaml
> new file mode 100644
> index ..c2fe8c08d99e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/amlogic,meson8b-usb2-phy.yaml
> @@ -0,0 +1,61 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/phy/amlogic,meson8b-usb2-phy.yaml#";
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#";
> +
> +title: Amlogic Meson8, Meson8b, Meson8m2 and GXBB USB2 PHY
> +
> +maintainers:
> +  - Martin Blumenstingl 
> +
> +properties:
> +  compatible:
> +oneOf:
> +  - items:
> +  - enum:
> +- amlogic,meson8-usb2-phy
> +- amlogic,meson8b-usb2-phy
> +  - const: amlogic,meson-mx-usb2-phy
> +  - const: amlogic,meson-gxbb-usb2-phy
> +
> +  reg:
> +maxItems: 1
> +
> +  clocks:
> +minItems: 2
> +
> +  clock-names:
> +items:
> +  - const: usb_general
> +  - const: usb
> +
> +  resets:
> +minItems: 1
> +
> +  "#phy-cells":
> +const: 0
> +
> +  phy-supply:
> + description:
> +   Phandle to a regulator that provides power to the PHY. This
> +   regulator will be managed during the PHY power on/off sequence.
> +
> +required:
> +  - compatible
> +  - reg
> +  - clocks
> +  - clock-names
> +  - "#phy-cells"
> +
> +examples:
> +  - |
> +usb-phy@c000 {
> +  compatible = "amlogic,meson-gxbb-usb2-phy";
> +  reg = <0xc000 0x20>;
> +  resets = <&reset_usb_phy>;
> +  clocks = <&clk_usb_general>, <&reset_usb>;
> +  clock-names = "usb_general", "usb";
> +  phy-supply = <&usb_vbus>;
> +  #phy-cells = <0>;
> +};
> diff --git a/Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt 
> b/Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt
> deleted file mode 100644
> index d81d73aea608..
> --- a/Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt
> +++ /dev/null
> @@ -1,28 +0,0 @@
> -* Amlogic Meson8, Meson8b and GXBB USB2 PHY
> -
> -Required properties:
> -- compatible:  Depending on the platform this should be one of:
> -   "amlogic,meson8-usb2-phy"
> -   "amlogic,meson8b-usb2-phy"
> -   "amlogic,meson-gxbb-usb2-phy"
> -- reg: The base address and length of the registers
> -- #phys-cells: should be 0 (see phy-bindings.txt in this directory)
> -- clocks:  phandle and clock identifier for the phy clocks
> -- clock-names: "usb_general" and "usb"
> -
> -Optional properties:
> -- resets:  reference to the reset controller
> -- phy-supply:  see phy-bindings.txt in this directory
> -
> -
> -Example:
> -
> -usb0_phy: usb-phy@c000 {
> -   compatible = "amlogic,meson-gxbb-usb2-phy";
> -   #phy-cells = <0>;
> -   reg = <0x0 0xc000 0x0 0x20>;
> -   resets = <&reset RESET_USB_OTG>;
> -   clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB0>;
> -   clock-names = "usb_general", "usb";
> -   phy-supply = <&usb_vbus>;
> -};
> --
> 2.26.2
>


Re: [PATCH 1/1] ARM: dts: meson8b: mxq: improve support for the TRONFY MXQ S805

2019-05-27 Thread hex dump
On Fri, May 24, 2019 at 8:19 PM Martin Blumenstingl
 wrote:
>
> The TRONFY MXQ comes with either 1GB or 2GB RAM.
>
> Both variants share (like most boards based on Amlogic reference
> designs):
> - 10/100 PHY (IC Plus IP101GR) with GPIOH_4 being the reset line and
>   GPIOH_3 the interrupt line
> - SD card slot with the card detection GPIO at CARD_6
> - VCCK is generated by PWM_C with a period of 1148ns and XTAL as input
>   clock
> - USB OTG exposed on one of the USB-A connectors
> - 4-port USB hub with 3 ports exposed to the outside
>
> There seem the multiple board revision out there according to various
> forum posts:
> - storage: eMMC or NAND flash
> - wifi: Ampak AP6210 or Realtek 8189
>
> Add support for the following functionality:
> - SoC temperature (hwmon)
> - changing the CPU voltage
> - Ethernet connectivity
> - SD card
> - USB
>
> Signed-off-by: Martin Blumenstingl 
Tested-by: hexdump 

BEFORE (no patches from this series applied):
the mxq device was not really useable with the old mainline dtb as
most peripeherals were not supported

AFTER (the patch applied):
the rresulting dtb works perfectly fine with my mxq device and all
mentioned supported functions work as expected

best wishes - hexdump