Re: [v3,5/6] pwm: add R-Car H3 device tree bindings

2016-04-05 Thread Simon Horman
On Thu, Mar 31, 2016 at 01:39:15PM +0200, Ulrich Hecht wrote:
> Signed-off-by: Ulrich Hecht 
> Acked-by: Geert Uytterhoeven 

Acked-by: Simon Horman 

> ---
> Documentation/devicetree/bindings/pwm/renesas,pwm-rcar.txt | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/pwm/renesas,pwm-rcar.txt 
> b/Documentation/devicetree/bindings/pwm/renesas,pwm-rcar.txt
> index 0822a08..d6de643 100644
> --- a/Documentation/devicetree/bindings/pwm/renesas,pwm-rcar.txt
> +++ b/Documentation/devicetree/bindings/pwm/renesas,pwm-rcar.txt
> @@ -7,6 +7,7 @@ Required Properties:
>   - "renesas,pwm-r8a7790": for R-Car H2
>   - "renesas,pwm-r8a7791": for R-Car M2-W
>   - "renesas,pwm-r8a7794": for R-Car E2
> + - "renesas,pwm-r8a7795": for R-Car H3
>  - reg: base address and length of the registers block for the PWM.
>  - #pwm-cells: should be 2. See pwm.txt in this directory for a description of
>the cells format.


Re: [v3,1/6] pwm: rcar: Use ARCH_RENESAS

2016-04-05 Thread Simon Horman
On Thu, Mar 31, 2016 at 01:39:11PM +0200, Ulrich Hecht wrote:
> From: Ryo Kodama 
> 
> Replace ARCH_RCAR_GEN{1,2} with ARCH_RENESAS in order to support R-Car Gen3.
> 
> Signed-off-by: Ryo Kodama 
> Signed-off-by: Harunobu Kurokawa 
> Signed-off-by: Ulrich Hecht 
> Acked-by: Geert Uytterhoeven 

Acked-by: Simon Horman 

> ---
> drivers/pwm/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
> index c182efc..3a2e232 100644
> --- a/drivers/pwm/Kconfig
> +++ b/drivers/pwm/Kconfig
> @@ -305,7 +305,7 @@ config PWM_PXA
>  
>  config PWM_RCAR
>   tristate "Renesas R-Car PWM support"
> - depends on ARCH_RCAR_GEN1 || ARCH_RCAR_GEN2 || COMPILE_TEST
> + depends on ARCH_RENESAS || COMPILE_TEST
>   depends on HAS_IOMEM
>   help
> This driver exposes the PWM Timer controller found in Renesas


Re: [v2,5/5] arm64: dts: salvator-x: populate EXTALR

2016-04-05 Thread Simon Horman
On Wed, Mar 30, 2016 at 04:58:22PM +0200, Wolfram Sang wrote:
> From: Wolfram Sang 
> 
> It can be used for the watchdog.
> 
> Signed-off-by: Wolfram Sang 
> Acked-by: Geert Uytterhoeven 

Thanks, I have queued this up.


Re: [v2,9/9] ARM: shmobile: r8a7790: lager: Enable UHS-I SDR-50

2016-04-05 Thread Simon Horman
On Fri, Apr 01, 2016 at 05:44:39PM +0200, Wolfram Sang wrote:
> From: Wolfram Sang 
> 
> Add the "1v8" pinctrl state and sd-uhs-sdr50 property to SDHI{0,2}.

For some reason which I am entirely unsure of git didn't apply this cleanly
so I did so manually. Please double check that the following is correct.

From: Wolfram Sang 
Subject: [PATCH] ARM: shmobile: r8a7790: lager: Enable UHS-I SDR-50

Add the "1v8" pinctrl state and sd-uhs-sdr50 property to SDHI{0,2}.

Signed-off-by: Ben Hutchings 
Signed-off-by: Wolfram Sang 
Signed-off-by: Simon Horman 
---
 arch/arm/boot/dts/r8a7790-lager.dts | 22 --
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/r8a7790-lager.dts 
b/arch/arm/boot/dts/r8a7790-lager.dts
index aa6ca92a9485..75fc8d1cb7e3 100644
--- a/arch/arm/boot/dts/r8a7790-lager.dts
+++ b/arch/arm/boot/dts/r8a7790-lager.dts
@@ -346,11 +346,25 @@
sdhi0_pins: sd0 {
renesas,groups = "sdhi0_data4", "sdhi0_ctrl";
renesas,function = "sdhi0";
+   power-source = <3300>;
+   };
+
+   sdhi0_pins_uhs: sd0_uhs {
+   groups = "sdhi0_data4", "sdhi0_ctrl";
+   function = "sdhi0";
+   power-source = <1800>;
};
 
sdhi2_pins: sd2 {
renesas,groups = "sdhi2_data4", "sdhi2_ctrl";
renesas,function = "sdhi2";
+   power-source = <3300>;
+   };
+
+   sdhi2_pins_uhs: sd2_uhs {
+   groups = "sdhi2_data4", "sdhi2_ctrl";
+   function = "sdhi2";
+   power-source = <1800>;
};
 
mmc1_pins: mmc1 {
@@ -539,21 +553,25 @@
 
  {
pinctrl-0 = <_pins>;
-   pinctrl-names = "default";
+   pinctrl-1 = <_pins_uhs>;
+   pinctrl-names = "default", "state_uhs";
 
vmmc-supply = <_sdhi0>;
vqmmc-supply = <_sdhi0>;
cd-gpios = < 6 GPIO_ACTIVE_LOW>;
+   sd-uhs-sdr50;
status = "okay";
 };
 
  {
pinctrl-0 = <_pins>;
-   pinctrl-names = "default";
+   pinctrl-1 = <_pins_uhs>;
+   pinctrl-names = "default", "state_uhs";
 
vmmc-supply = <_sdhi2>;
vqmmc-supply = <_sdhi2>;
cd-gpios = < 22 GPIO_ACTIVE_LOW>;
+   sd-uhs-sdr50;
status = "okay";
 };
 
-- 
2.1.4



Re: [PATCH v3 0/2] Add PCIe to r8a7795 & Salvator-X

2016-04-05 Thread Simon Horman
On Tue, Apr 05, 2016 at 01:02:24PM +0200, Geert Uytterhoeven wrote:
> Hi Phil,
> 
> On Tue, Apr 5, 2016 at 12:51 PM, Phil Edworthy
>  wrote:
> > With these two patches PCIe works on the Salvator-X board.
> >
> > v3:
> >  Really use GIC_SPI for all interrupts.
> 
> Thanks!
> 
> For the generic properties (I'm no "ranges" expert):
> Acked-by: Geert Uytterhoeven 

Thanks, I have queued these up for v4.7.


RE: [PATCH 2/3] phy: rcar-gen3-usb2: Add vbus-supply to handle VBUS on/off

2016-04-05 Thread Yoshihiro Shimoda
Hi,

> From: Kishon Vijay Abraham I
> Sent: Tuesday, April 05, 2016 7:54 PM
> 
> Hi,
> 
> On Thursday 03 March 2016 03:39 PM, Yoshihiro Shimoda wrote:
> > To handle the VBUS on/off by a regulator driver, this patch adds
> > regulator APIs calling in the driver and description about vbus-supply
> > in the rcar-gen3-phy-usb2.txt.
> >
> > Signed-off-by: Yoshihiro Shimoda 
> > Acked-by: Rob Herring 
> > ---
> >  .../devicetree/bindings/phy/rcar-gen3-phy-usb2.txt |  2 ++
> >  drivers/phy/phy-rcar-gen3-usb2.c   | 28 
> > ++
> >  2 files changed, 30 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
> b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
> > index 86826ca..7243b3b 100644
> > --- a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
> > +++ b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
> > @@ -21,6 +21,8 @@ To use a USB channel where USB 2.0 Host and HSUSB (USB 
> > 2.0 Peripheral) are
> >  combined, the device tree node should set interrupt properties to use the
> >  channel as USB OTG:
> >  - interrupts: interrupt specifier for the PHY.
> > +- vbus-supply: Phandle to a regulator that provides power to the VBUS. This
> > +  regulator will be managed during the PHY power on/off sequence.
> 
> Why not use phy-supply from the generic PHY binding? It can then be managed by
> the phy core during power_on/power_off.

Thank you for the review!

I'm afraid, I should have added your address as CC when I sent RFC patch set.
Anyway, Rob had a comment about "phy-supply":
http://thread.gmane.org/gmane.linux.kernel.renesas-soc/366/focus=406

I agreed with Rob because the document mentioned the followings:

Optional Properties:
phy-supply: Phandle to a regulator that provides power to the PHY. This
regulator will be managed during the PHY power on/off sequence.

https://git.kernel.org/cgit/linux/kernel/git/kishon/linux-phy.git/tree/Documentation/devicetree/bindings/phy/phy-bindings.txt?h=next#n13

And then, I changed the "phy-supply" to "vbus-supply" and this driver managed 
the "vbus-supply".
Or, do I misunderstand the document?

Best regards,
Yoshihiro Shimoda

> Thanks
> Kishon
> 
> >
> >  Example (R-Car H3):
> >
> > diff --git a/drivers/phy/phy-rcar-gen3-usb2.c 
> > b/drivers/phy/phy-rcar-gen3-usb2.c
> > index 3c647cd..7b14244 100644
> > --- a/drivers/phy/phy-rcar-gen3-usb2.c
> > +++ b/drivers/phy/phy-rcar-gen3-usb2.c
> > @@ -19,6 +19,7 @@
> >  #include 
> >  #include 
> >  #include 
> > +#include 
> >
> >  /*** USB2.0 Host registers (original offset is +0x200) ***/
> >  #define USB2_INT_ENABLE0x000
> > @@ -77,6 +78,7 @@
> >  struct rcar_gen3_chan {
> > void __iomem *base;
> > struct phy *phy;
> > +   struct regulator *vbus;
> > bool has_otg;
> >  };
> >
> > @@ -210,6 +212,13 @@ static int rcar_gen3_phy_usb2_power_on(struct phy *p)
> > struct rcar_gen3_chan *channel = phy_get_drvdata(p);
> > void __iomem *usb2_base = channel->base;
> > u32 val;
> > +   int ret;
> > +
> > +   if (channel->vbus) {
> > +   ret = regulator_enable(channel->vbus);
> > +   if (ret)
> > +   return ret;
> > +   }
> >
> > val = readl(usb2_base + USB2_USBCTR);
> > val |= USB2_USBCTR_PLL_RST;
> > @@ -220,10 +229,22 @@ static int rcar_gen3_phy_usb2_power_on(struct phy *p)
> > return 0;
> >  }
> >
> > +static int rcar_gen3_phy_usb2_power_off(struct phy *p)
> > +{
> > +   struct rcar_gen3_chan *channel = phy_get_drvdata(p);
> > +   int ret = 0;
> > +
> > +   if (channel->vbus)
> > +   ret = regulator_disable(channel->vbus);
> > +
> > +   return ret;
> > +}
> > +
> >  static struct phy_ops rcar_gen3_phy_usb2_ops = {
> > .init   = rcar_gen3_phy_usb2_init,
> > .exit   = rcar_gen3_phy_usb2_exit,
> > .power_on   = rcar_gen3_phy_usb2_power_on,
> > +   .power_off  = rcar_gen3_phy_usb2_power_off,
> > .owner  = THIS_MODULE,
> >  };
> >
> > @@ -290,6 +311,13 @@ static int rcar_gen3_phy_usb2_probe(struct 
> > platform_device *pdev)
> > return PTR_ERR(channel->phy);
> > }
> >
> > +   channel->vbus = devm_regulator_get_optional(dev, "vbus");
> > +   if (IS_ERR(channel->vbus)) {
> > +   if (PTR_ERR(channel->vbus) == -EPROBE_DEFER)
> > +   return PTR_ERR(channel->vbus);
> > +   channel->vbus = NULL;
> > +   }
> > +
> > phy_set_drvdata(channel->phy, channel);
> >
> > provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
> >


Re: [PATCH v4 2/2] media: soc_camera: rcar_vin: add device tree support for r8a7792

2016-04-05 Thread Geert Uytterhoeven
Hi Guennadi,

On Tue, Apr 5, 2016 at 10:56 PM, Guennadi Liakhovetski
 wrote:
> On Tue, 15 Mar 2016, Simon Horman wrote:
>> Simply document new compatibility string.
>> As a previous patch adds a generic R-Car Gen2 compatibility string
>> there appears to be no need for a driver updates.
>>
>> By documenting this compat string it may be used in DTSs shipped, for
>> example as part of ROMs. It must be used in conjunction with the Gen2
>> fallback compat string. At this time there are no known differences between
>> the r8a7792 IP block and that implemented by the driver for the Gen2
>> fallback compat string. Thus there is no need to update the driver as the
>> use of the Gen2 fallback compat string will activate the correct code in
>> the current driver while leaving the option for r8a7792-specific driver
>> code to be activated in an updated driver should the need arise.
>>
>> Signed-off-by: Simon Horman 
>> Acked-by: Geert Uytterhoeven 
>
> Strictly speaking, I see an ack from Geert to patch 1/2, but I don't see
> one for this patch 2/2. Have I missed it or did Geert mean to ack the
> whole series and forgot to mention that?

Sorry, apparently I replied with the "sting" comment and my ack to Simon only,
not to all.

Hence FTR:
Acked-by: Geert Uytterhoeven 

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


Re: [PATCH v2] PCI: rcar-pcie: Remove Gen2 designation from Kconfig

2016-04-05 Thread Bjorn Helgaas
Hi Simon,

On Thu, Mar 31, 2016 at 09:35:23AM +0900, Simon Horman wrote:
> It appears that Gen2 is a misnomer for the R-Car PCIE driver
> which also supports Gen 1 and Gen 3 SoCs. Accordingly, drop Gen 2
> from the help text and Kconfig symbol.
> 
> Also, re-arange the Kconfig symbol name to use PCIE as the prefix.
> This appears to be in keeping with other PCIE Kconfig symbols.
> 
> Reported-by: Geert Uytterhoeven 
> Signed-off-by: Simon Horman 
> ---
> Bjorn, if this patch is acceptable I would like to request that we
> co-ordinate things so that I can queue-up corresponding updates for
> arm and arm64 defconfigs in the same release. From my point of view
> v4.7 would make sense.

I'm fine with this.  What sort of coordination do you want to do?
It would probably be nice to combine this patch with the defconfig updates
so we don't have a bisection problem.  If you want to include this patch
and merge through another tree,

Acked-by: Bjorn Helgaas 

> v2
> * As suggested by Geert Uytterhoeven:
>   - Use PCIE as prefix in Kconfig symbol
> ---
>  drivers/pci/host/Kconfig  | 4 ++--
>  drivers/pci/host/Makefile | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pci/host/Kconfig b/drivers/pci/host/Kconfig
> index 7a0780d56d2d..8fb1cf54617d 100644
> --- a/drivers/pci/host/Kconfig
> +++ b/drivers/pci/host/Kconfig
> @@ -69,11 +69,11 @@ config PCI_RCAR_GEN2
> There are 3 internal PCI controllers available with a single
> built-in EHCI/OHCI host controller present on each one.
>  
> -config PCI_RCAR_GEN2_PCIE
> +config PCIE_RCAR
>   bool "Renesas R-Car PCIe controller"
>   depends on ARCH_RENESAS || (ARM && COMPILE_TEST)
>   help
> -   Say Y here if you want PCIe controller support on R-Car Gen2 SoCs.
> +   Say Y here if you want PCIe controller support on R-Car SoCs.
>  
>  config PCI_HOST_COMMON
>   bool
> diff --git a/drivers/pci/host/Makefile b/drivers/pci/host/Makefile
> index d85b5faf9bbc..d3d8e1b36fb9 100644
> --- a/drivers/pci/host/Makefile
> +++ b/drivers/pci/host/Makefile
> @@ -7,7 +7,7 @@ obj-$(CONFIG_PCI_HYPERV) += pci-hyperv.o
>  obj-$(CONFIG_PCI_MVEBU) += pci-mvebu.o
>  obj-$(CONFIG_PCI_TEGRA) += pci-tegra.o
>  obj-$(CONFIG_PCI_RCAR_GEN2) += pci-rcar-gen2.o
> -obj-$(CONFIG_PCI_RCAR_GEN2_PCIE) += pcie-rcar.o
> +obj-$(CONFIG_PCIE_RCAR) += pcie-rcar.o
>  obj-$(CONFIG_PCI_HOST_COMMON) += pci-host-common.o
>  obj-$(CONFIG_PCI_HOST_GENERIC) += pci-host-generic.o
>  obj-$(CONFIG_PCIE_SPEAR13XX) += pcie-spear13xx.o
> -- 
> 2.1.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 00/04] iommu/ipmmu-vmsa: IPMMU CONFIG_IOMMU_DMA update

2016-04-05 Thread Joerg Roedel
On Wed, Mar 16, 2016 at 02:04:31AM +0900, Magnus Damm wrote:
> iommu/ipmmu-vmsa: IPMMU CONFIG_IOMMU_DMA update
> 
> [PATCH 01/04] iommu/ipmmu-vmsa: 32-bit ARM may have CONFIG_IOMMU_DMA=y
> [PATCH 02/04] iommu/ipmmu-vmsa: Break out utlb parsing code
> [PATCH 03/04] iommu/ipmmu-vmsa: Break out domain allocation code
> [PATCH 04/04] iommu/ipmmu-vmsa: Add new IOMMU_DOMAIN_DMA ops

These patches do not apply to v4.6-rc2. Can you please rebase them,
address the comments and add the Reviewed-by's?


Joerg



Re: [PATCH v2 0/9] r8a7790: add UHS-I (SDR50) support to Lager

2016-04-05 Thread Wolfram Sang

> > Do you want me to resend or could you fix it before applying?
> 
> Patch 1->7 is applied for next (amended patch7), thanks!

Thanks! Simon, can you pick up patches 8+9 now?

Next series coming soon... ;)



signature.asc
Description: PGP signature


Re: [PATCH v2 0/9] r8a7790: add UHS-I (SDR50) support to Lager

2016-04-05 Thread Ulf Hansson
On 4 April 2016 at 17:21, Wolfram Sang  wrote:
>
>> The documentation of mmc is quite poor. There are both code and
>> specification that needs to be understand, so some more help from
>> kernel doc could clearly help.
>
> I agree.
>
>> Anyway, I noticed that patch 6 helps to improve some documentation,
>> that's great - thanks!
>
> You're welcome. It wasn't too much work and maybe it helps someone with
> debugging. I found some bug reports on the web which sounded somewhat
> similar.
>
>> I only had one minor comment on patch 7, the rest looks good to me!
>
> Do you want me to resend or could you fix it before applying?

Patch 1->7 is applied for next (amended patch7), thanks!

Kind regards
Uffe


Re: [PATCH v3 0/2] Add PCIe to r8a7795 & Salvator-X

2016-04-05 Thread Geert Uytterhoeven
Hi Phil,

On Tue, Apr 5, 2016 at 12:51 PM, Phil Edworthy
 wrote:
> With these two patches PCIe works on the Salvator-X board.
>
> v3:
>  Really use GIC_SPI for all interrupts.

Thanks!

For the generic properties (I'm no "ranges" expert):
Acked-by: Geert Uytterhoeven 

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


[PATCH v3 1/2] arm64: renesas: r8a7795: Add PCIe nodes

2016-04-05 Thread Phil Edworthy
Signed-off-by: Phil Edworthy 
---
v3:
 Really use GIC_SPI for all interrupts.

v2:
 Dropped the "_clk" suffix from the PCIe bus device node's name.
 Removed "clock-output-names" property from the PCIe bus node.
 Use GIC_SPI  for all interrupts.
---
 arch/arm64/boot/dts/renesas/r8a7795.dtsi | 57 
 1 file changed, 57 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi 
b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
index 868c10e..11f9971 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
@@ -131,6 +131,14 @@
status = "disabled";
};
 
+   /* External PCIe clock - can be overridden by the board */
+   pcie_bus_clk: pcie_bus {
+   compatible = "fixed-clock";
+   #clock-cells = <0>;
+   clock-frequency = <1>;
+   status = "disabled";
+   };
+
soc {
compatible = "simple-bus";
interrupt-parent = <>;
@@ -1156,5 +1164,54 @@
power-domains = <>;
status = "disabled";
};
+   pciec0: pcie@fe00 {
+   compatible = "renesas,pcie-r8a7795";
+   reg = <0 0xfe00 0 0x8>;
+   #address-cells = <3>;
+   #size-cells = <2>;
+   bus-range = <0x00 0xff>;
+   device_type = "pci";
+   ranges = <0x0100 0 0x 0 0xfe10 0 
0x0010
+   0x0200 0 0xfe20 0 0xfe20 0 
0x0020
+   0x0200 0 0x3000 0 0x3000 0 
0x0800
+   0x4200 0 0x3800 0 0x3800 0 
0x0800>;
+   /* Map all possible DDR as inbound ranges */
+   dma-ranges = <0x4200 0 0x4000 0 0x4000 0 
0x4000>;
+   interrupts = ,
+   ,
+   ;
+   #interrupt-cells = <1>;
+   interrupt-map-mask = <0 0 0 0>;
+   interrupt-map = <0 0 0 0  GIC_SPI 116 
IRQ_TYPE_LEVEL_HIGH>;
+   clocks = < CPG_MOD 319>, <_bus_clk>;
+   clock-names = "pcie", "pcie_bus";
+   power-domains = <>;
+   status = "disabled";
+   };
+
+   pciec1: pcie@ee80 {
+   compatible = "renesas,pcie-r8a7795";
+   reg = <0 0xee80 0 0x8>;
+   #address-cells = <3>;
+   #size-cells = <2>;
+   bus-range = <0x00 0xff>;
+   device_type = "pci";
+   ranges = <0x0100 0 0x 0 0xee90 0 
0x0010
+   0x0200 0 0xeea0 0 0xeea0 0 
0x0020
+   0x0200 0 0xc000 0 0xc000 0 
0x0800
+   0x4200 0 0xc800 0 0xc800 0 
0x0800>;
+   /* Map all possible DDR as inbound ranges */
+   dma-ranges = <0x4200 0 0x4000 0 0x4000 0 
0x4000>;
+   interrupts = ,
+   ,
+   ;
+   #interrupt-cells = <1>;
+   interrupt-map-mask = <0 0 0 0>;
+   interrupt-map = <0 0 0 0  GIC_SPI 148 
IRQ_TYPE_LEVEL_HIGH>;
+   clocks = < CPG_MOD 318>, <_bus_clk>;
+   clock-names = "pcie", "pcie_bus";
+   power-domains = <>;
+   status = "disabled";
+   };
};
 };
-- 
2.5.0



Re: [PATCH 2/3] phy: rcar-gen3-usb2: Add vbus-supply to handle VBUS on/off

2016-04-05 Thread Kishon Vijay Abraham I
Hi,

On Thursday 03 March 2016 03:39 PM, Yoshihiro Shimoda wrote:
> To handle the VBUS on/off by a regulator driver, this patch adds
> regulator APIs calling in the driver and description about vbus-supply
> in the rcar-gen3-phy-usb2.txt.
> 
> Signed-off-by: Yoshihiro Shimoda 
> Acked-by: Rob Herring 
> ---
>  .../devicetree/bindings/phy/rcar-gen3-phy-usb2.txt |  2 ++
>  drivers/phy/phy-rcar-gen3-usb2.c   | 28 
> ++
>  2 files changed, 30 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt 
> b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
> index 86826ca..7243b3b 100644
> --- a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
> +++ b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
> @@ -21,6 +21,8 @@ To use a USB channel where USB 2.0 Host and HSUSB (USB 2.0 
> Peripheral) are
>  combined, the device tree node should set interrupt properties to use the
>  channel as USB OTG:
>  - interrupts: interrupt specifier for the PHY.
> +- vbus-supply: Phandle to a regulator that provides power to the VBUS. This
> +regulator will be managed during the PHY power on/off sequence.

Why not use phy-supply from the generic PHY binding? It can then be managed by
the phy core during power_on/power_off.

Thanks
Kishon

>  
>  Example (R-Car H3):
>  
> diff --git a/drivers/phy/phy-rcar-gen3-usb2.c 
> b/drivers/phy/phy-rcar-gen3-usb2.c
> index 3c647cd..7b14244 100644
> --- a/drivers/phy/phy-rcar-gen3-usb2.c
> +++ b/drivers/phy/phy-rcar-gen3-usb2.c
> @@ -19,6 +19,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  
>  /*** USB2.0 Host registers (original offset is +0x200) ***/
>  #define USB2_INT_ENABLE  0x000
> @@ -77,6 +78,7 @@
>  struct rcar_gen3_chan {
>   void __iomem *base;
>   struct phy *phy;
> + struct regulator *vbus;
>   bool has_otg;
>  };
>  
> @@ -210,6 +212,13 @@ static int rcar_gen3_phy_usb2_power_on(struct phy *p)
>   struct rcar_gen3_chan *channel = phy_get_drvdata(p);
>   void __iomem *usb2_base = channel->base;
>   u32 val;
> + int ret;
> +
> + if (channel->vbus) {
> + ret = regulator_enable(channel->vbus);
> + if (ret)
> + return ret;
> + }
>  
>   val = readl(usb2_base + USB2_USBCTR);
>   val |= USB2_USBCTR_PLL_RST;
> @@ -220,10 +229,22 @@ static int rcar_gen3_phy_usb2_power_on(struct phy *p)
>   return 0;
>  }
>  
> +static int rcar_gen3_phy_usb2_power_off(struct phy *p)
> +{
> + struct rcar_gen3_chan *channel = phy_get_drvdata(p);
> + int ret = 0;
> +
> + if (channel->vbus)
> + ret = regulator_disable(channel->vbus);
> +
> + return ret;
> +}
> +
>  static struct phy_ops rcar_gen3_phy_usb2_ops = {
>   .init   = rcar_gen3_phy_usb2_init,
>   .exit   = rcar_gen3_phy_usb2_exit,
>   .power_on   = rcar_gen3_phy_usb2_power_on,
> + .power_off  = rcar_gen3_phy_usb2_power_off,
>   .owner  = THIS_MODULE,
>  };
>  
> @@ -290,6 +311,13 @@ static int rcar_gen3_phy_usb2_probe(struct 
> platform_device *pdev)
>   return PTR_ERR(channel->phy);
>   }
>  
> + channel->vbus = devm_regulator_get_optional(dev, "vbus");
> + if (IS_ERR(channel->vbus)) {
> + if (PTR_ERR(channel->vbus) == -EPROBE_DEFER)
> + return PTR_ERR(channel->vbus);
> + channel->vbus = NULL;
> + }
> +
>   phy_set_drvdata(channel->phy, channel);
>  
>   provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
> 


[PATCH v3 2/2] arm64: dts: r8a7795: enable PCIe on Salvator-X

2016-04-05 Thread Phil Edworthy
Signed-off-by: Phil Edworthy 
---
v3: no changes
v2: no changes
---
 arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 12 
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts 
b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
index 5165d45..ccd2d7f 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
@@ -388,3 +388,15 @@
  {
status = "okay";
 };
+
+_bus_clk {
+   status = "okay";
+};
+
+ {
+   status = "okay";
+};
+
+ {
+   status = "okay";
+};
-- 
2.5.0



Re: [Bug]:Koelsch: DU, Could not show an image or picture on HDMI display.

2016-04-05 Thread Geert Uytterhoeven
Hi Hiep-san,

On Tue, Apr 5, 2016 at 4:35 AM, Cao Minh Hiep  wrote:
> On 04/04/2016 05:05 PM, Geert Uytterhoeven wrote:
>> On Fri, Apr 1, 2016 at 9:57 AM, Cao Minh Hiep  wrote:
>>> This Linux version v4.5, we can not show an image or picture on HDMI
>>> display.
>>> (There is no problem on v4.5-rc3, could show an image on HDMI display
>>> normally)
>>
>> Thanks for reporting!
>>
>> I tried v4.5-rc3 with both my own .config and shmobile_defconfig.
>> My monitor says "no signal", and "modetest -M rcar-du -c" claims HDMI-A-1
>> is
>> disconnected.
>>
>> Can you please share your .config and test scenario?
>
> I attach the .config file of v4.5 stable, and here is our test scenario.

Thanks!

Your config makes no difference on my Iiyama ProLite E2273HDS ("no signal"
etc.).

After moving Koelsch to the living room, and connecting it to a Full HD
Sony TV, I get:

rcar-du feb0.display: failed to allocate buffer with size 8294400
rcar-du feb0.display: Failed to set initial hw configuration.
rcar-du feb0.display: failed to initialize DRM/KMS (-12)
rcar-du: probe of feb0.display failed with error -12

Don't you get this? The DELL S2240L is also Full HD, so it should need a buffer
of 1920 * 1080 * 4 bytes, too (unless its preferred mode is smaller).

Configuring:

CONFIG_CMA=y
# CONFIG_CMA_DEBUG is not set
CONFIG_CMA_AREAS=7
CONFIG_DMA_CMA=y
CONFIG_CMA_SIZE_MBYTES=16
CONFIG_CMA_SIZE_SEL_MBYTES=y
# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
# CONFIG_CMA_SIZE_SEL_MIN is not set
# CONFIG_CMA_SIZE_SEL_MAX is not set
CONFIG_CMA_ALIGNMENT=8

Gives me an image (using v4.5-rc3), finally!
So my Iiyama display is to blame ;-(

OHCI-PCI doesn't seem to work with CONFIG_DMA_CMA=y, as the screen is
flooded with:

ohci-pci 0001:01:01.0: OHCI Unrecoverable Error, scheduling NEC chip restart
ohci-pci :00:01.0: OHCI Unrecoverable Error, scheduling NEC chip restart

and a single:

renesas_usbhs e659.usb: fifo select error

I disabled CONFIG_USB_OHCI_HCD_PCI to get rid of these errors.

fbtest (git://git.kernel.org/pub/scm/linux/kernel/git/geert/fbtest.git) is
working fine.

If I upgrade to v4.5 or v4.6-rc2, the display still works for me?
So the aforementioned commit didn't break it on my board.

If it fails for you, do you see a change in the dmesg output?

> 2. Modified command line by adding this parameter "console=ttySC0,38400":
> vim arch/arm/boot/dts/r8a7791-koelsch.dts
> bootargs = "console=ttySC0,38400 ignore_loglevel rw root=/dev/nfs
> ip=dhcp";
> (We can not set the parameter on uboot.)

BTW, you can use CONFIG_CMDLINE and CONFIG_CMDLINE_FORCE instead of changing
the DTS.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


Re: [PATCH v2 1/2] arm64: renesas: r8a7795: Add PCIe nodes

2016-04-05 Thread Geert Uytterhoeven
Hi Phil,

On Tue, Apr 5, 2016 at 12:25 PM, Phil Edworthy
 wrote:
> Signed-off-by: Phil Edworthy 
> ---
> v2:
>  Dropped the "_clk" suffix from the PCIe bus device node's name.
>  Removed "clock-output-names" property from the PCIe bus node.
>  Use GIC_SPI  for all interrupts.

Thanks for the update, but you forgot two of them:

> +   interrupt-map = <0 0 0 0  0 116 
> IRQ_TYPE_LEVEL_HIGH>;

...  GIC_SPI ...

> +   interrupt-map = <0 0 0 0  0 148 
> IRQ_TYPE_LEVEL_HIGH>;

...  GIC_SPI ...

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


[PATCH v2 0/2] Add PCIe to r8a7795 & Salvator-X

2016-04-05 Thread Phil Edworthy
With these two patches PCIe works on the Salvator-X board.

v2:
 Fixes for Geert's comments.

Phil Edworthy (2):
  arm64: renesas: r8a7795: Add PCIe nodes
  arm64: dts: r8a7795: enable PCIe on Salvator-X

 arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 12 +
 arch/arm64/boot/dts/renesas/r8a7795.dtsi   | 57 ++
 2 files changed, 69 insertions(+)

-- 
2.5.0



[PATCH v2 2/2] arm64: dts: r8a7795: enable PCIe on Salvator-X

2016-04-05 Thread Phil Edworthy
Signed-off-by: Phil Edworthy 
---
v2: no changes
---
 arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 12 
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts 
b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
index 5165d45..ccd2d7f 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
@@ -388,3 +388,15 @@
  {
status = "okay";
 };
+
+_bus_clk {
+   status = "okay";
+};
+
+ {
+   status = "okay";
+};
+
+ {
+   status = "okay";
+};
-- 
2.5.0



[PATCH v2 1/2] arm64: renesas: r8a7795: Add PCIe nodes

2016-04-05 Thread Phil Edworthy
Signed-off-by: Phil Edworthy 
---
v2:
 Dropped the "_clk" suffix from the PCIe bus device node's name.
 Removed "clock-output-names" property from the PCIe bus node.
 Use GIC_SPI  for all interrupts.
---
 arch/arm64/boot/dts/renesas/r8a7795.dtsi | 57 
 1 file changed, 57 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi 
b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
index 868c10e..b2edc0b 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
@@ -131,6 +131,14 @@
status = "disabled";
};
 
+   /* External PCIe clock - can be overridden by the board */
+   pcie_bus_clk: pcie_bus {
+   compatible = "fixed-clock";
+   #clock-cells = <0>;
+   clock-frequency = <1>;
+   status = "disabled";
+   };
+
soc {
compatible = "simple-bus";
interrupt-parent = <>;
@@ -1156,5 +1164,54 @@
power-domains = <>;
status = "disabled";
};
+   pciec0: pcie@fe00 {
+   compatible = "renesas,pcie-r8a7795";
+   reg = <0 0xfe00 0 0x8>;
+   #address-cells = <3>;
+   #size-cells = <2>;
+   bus-range = <0x00 0xff>;
+   device_type = "pci";
+   ranges = <0x0100 0 0x 0 0xfe10 0 
0x0010
+   0x0200 0 0xfe20 0 0xfe20 0 
0x0020
+   0x0200 0 0x3000 0 0x3000 0 
0x0800
+   0x4200 0 0x3800 0 0x3800 0 
0x0800>;
+   /* Map all possible DDR as inbound ranges */
+   dma-ranges = <0x4200 0 0x4000 0 0x4000 0 
0x4000>;
+   interrupts = ,
+   ,
+   ;
+   #interrupt-cells = <1>;
+   interrupt-map-mask = <0 0 0 0>;
+   interrupt-map = <0 0 0 0  0 116 
IRQ_TYPE_LEVEL_HIGH>;
+   clocks = < CPG_MOD 319>, <_bus_clk>;
+   clock-names = "pcie", "pcie_bus";
+   power-domains = <>;
+   status = "disabled";
+   };
+
+   pciec1: pcie@ee80 {
+   compatible = "renesas,pcie-r8a7795";
+   reg = <0 0xee80 0 0x8>;
+   #address-cells = <3>;
+   #size-cells = <2>;
+   bus-range = <0x00 0xff>;
+   device_type = "pci";
+   ranges = <0x0100 0 0x 0 0xee90 0 
0x0010
+   0x0200 0 0xeea0 0 0xeea0 0 
0x0020
+   0x0200 0 0xc000 0 0xc000 0 
0x0800
+   0x4200 0 0xc800 0 0xc800 0 
0x0800>;
+   /* Map all possible DDR as inbound ranges */
+   dma-ranges = <0x4200 0 0x4000 0 0x4000 0 
0x4000>;
+   interrupts = ,
+   ,
+   ;
+   #interrupt-cells = <1>;
+   interrupt-map-mask = <0 0 0 0>;
+   interrupt-map = <0 0 0 0  0 148 
IRQ_TYPE_LEVEL_HIGH>;
+   clocks = < CPG_MOD 318>, <_bus_clk>;
+   clock-names = "pcie", "pcie_bus";
+   power-domains = <>;
+   status = "disabled";
+   };
};
 };
-- 
2.5.0



[PATCH/RFC 4/5] usb: renesas_usbhs: change arguments of dma_map_ctrl()

2016-04-05 Thread Yoshihiro Shimoda
In near the future, since usbhsg_dma_map_ctrl() needs DMA device
structure, this patch changes arguments of dma_map_ctrl() to give
such data. (This patch is only change the argument.)

Signed-off-by: Yoshihiro Shimoda 
---
 drivers/usb/renesas_usbhs/fifo.c   | 4 +++-
 drivers/usb/renesas_usbhs/mod_gadget.c | 3 ++-
 drivers/usb/renesas_usbhs/mod_host.c   | 3 ++-
 drivers/usb/renesas_usbhs/pipe.c   | 3 ++-
 drivers/usb/renesas_usbhs/pipe.h   | 6 --
 5 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c
index eb19dc7..05e4dcd 100644
--- a/drivers/usb/renesas_usbhs/fifo.c
+++ b/drivers/usb/renesas_usbhs/fifo.c
@@ -798,8 +798,10 @@ static int __usbhsf_dma_map_ctrl(struct usbhs_pkt *pkt, 
int map)
struct usbhs_pipe *pipe = pkt->pipe;
struct usbhs_priv *priv = usbhs_pipe_to_priv(pipe);
struct usbhs_pipe_info *info = usbhs_priv_to_pipeinfo(priv);
+   struct usbhs_fifo *fifo = usbhs_pipe_to_fifo(pipe);
+   struct dma_chan *chan = usbhsf_dma_chan_get(fifo, pkt);
 
-   return info->dma_map_ctrl(pkt, map);
+   return info->dma_map_ctrl(chan->device->dev, pkt, map);
 }
 
 static void usbhsf_dma_complete(void *arg);
diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c 
b/drivers/usb/renesas_usbhs/mod_gadget.c
index 664b263..0ebc4a9 100644
--- a/drivers/usb/renesas_usbhs/mod_gadget.c
+++ b/drivers/usb/renesas_usbhs/mod_gadget.c
@@ -187,7 +187,8 @@ static void usbhsg_queue_push(struct usbhsg_uep *uep,
 /*
  * dma map/unmap
  */
-static int usbhsg_dma_map_ctrl(struct usbhs_pkt *pkt, int map)
+static int usbhsg_dma_map_ctrl(struct device *dma_dev, struct usbhs_pkt *pkt,
+  int map)
 {
struct usbhsg_request *ureq = usbhsg_pkt_to_ureq(pkt);
struct usb_request *req = >req;
diff --git a/drivers/usb/renesas_usbhs/mod_host.c 
b/drivers/usb/renesas_usbhs/mod_host.c
index 1a8e4c4..3bf0b72 100644
--- a/drivers/usb/renesas_usbhs/mod_host.c
+++ b/drivers/usb/renesas_usbhs/mod_host.c
@@ -929,7 +929,8 @@ static int usbhsh_dcp_queue_push(struct usb_hcd *hcd,
 /*
  * dma map functions
  */
-static int usbhsh_dma_map_ctrl(struct usbhs_pkt *pkt, int map)
+static int usbhsh_dma_map_ctrl(struct device *dma_dev, struct usbhs_pkt *pkt,
+  int map)
 {
if (map) {
struct usbhsh_request *ureq = usbhsh_pkt_to_ureq(pkt);
diff --git a/drivers/usb/renesas_usbhs/pipe.c b/drivers/usb/renesas_usbhs/pipe.c
index 78e9dba..77b615c 100644
--- a/drivers/usb/renesas_usbhs/pipe.c
+++ b/drivers/usb/renesas_usbhs/pipe.c
@@ -655,7 +655,8 @@ static void usbhsp_put_pipe(struct usbhs_pipe *pipe)
 }
 
 void usbhs_pipe_init(struct usbhs_priv *priv,
-int (*dma_map_ctrl)(struct usbhs_pkt *pkt, int map))
+int (*dma_map_ctrl)(struct device *dma_dev,
+struct usbhs_pkt *pkt, int map))
 {
struct usbhs_pipe_info *info = usbhs_priv_to_pipeinfo(priv);
struct usbhs_pipe *pipe;
diff --git a/drivers/usb/renesas_usbhs/pipe.h b/drivers/usb/renesas_usbhs/pipe.h
index 7835747..95185fd 100644
--- a/drivers/usb/renesas_usbhs/pipe.h
+++ b/drivers/usb/renesas_usbhs/pipe.h
@@ -47,7 +47,8 @@ struct usbhs_pipe_info {
struct usbhs_pipe *pipe;
int size;   /* array size of "pipe" */
 
-   int (*dma_map_ctrl)(struct usbhs_pkt *pkt, int map);
+   int (*dma_map_ctrl)(struct device *dma_dev, struct usbhs_pkt *pkt,
+   int map);
 };
 
 /*
@@ -84,7 +85,8 @@ int usbhs_pipe_is_running(struct usbhs_pipe *pipe);
 void usbhs_pipe_running(struct usbhs_pipe *pipe, int running);
 
 void usbhs_pipe_init(struct usbhs_priv *priv,
-int (*dma_map_ctrl)(struct usbhs_pkt *pkt, int map));
+int (*dma_map_ctrl)(struct device *dma_dev,
+struct usbhs_pkt *pkt, int map));
 int usbhs_pipe_get_maxpacket(struct usbhs_pipe *pipe);
 void usbhs_pipe_clear(struct usbhs_pipe *pipe);
 int usbhs_pipe_is_accessible(struct usbhs_pipe *pipe);
-- 
1.9.1



[PATCH/RFC 3/5] usb: renesas_usbhs: change function call orfer in usbhsf_dma_prepare_push()

2016-04-05 Thread Yoshihiro Shimoda
In near the future, since usbhsf_dma_{un}map() will use the "fifo" data,
this patch changes function call orfer in usbhsf_dma_prepare_push().

Signed-off-by: Yoshihiro Shimoda 
---
 drivers/usb/renesas_usbhs/fifo.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c
index b4de70e..eb19dc7 100644
--- a/drivers/usb/renesas_usbhs/fifo.c
+++ b/drivers/usb/renesas_usbhs/fifo.c
@@ -880,12 +880,12 @@ static int usbhsf_dma_prepare_push(struct usbhs_pkt *pkt, 
int *is_done)
if (!fifo)
goto usbhsf_pio_prepare_push;
 
-   if (usbhsf_dma_map(pkt) < 0)
-   goto usbhsf_pio_prepare_push;
-
ret = usbhsf_fifo_select(pipe, fifo, 0);
if (ret < 0)
-   goto usbhsf_pio_prepare_push_unmap;
+   goto usbhsf_pio_prepare_push;
+
+   if (usbhsf_dma_map(pkt) < 0)
+   goto usbhsf_pio_prepare_push_unselect;
 
pkt->trans = len;
 
@@ -894,8 +894,8 @@ static int usbhsf_dma_prepare_push(struct usbhs_pkt *pkt, 
int *is_done)
 
return 0;
 
-usbhsf_pio_prepare_push_unmap:
-   usbhsf_dma_unmap(pkt);
+usbhsf_pio_prepare_push_unselect:
+   usbhsf_fifo_unselect(pipe, fifo);
 usbhsf_pio_prepare_push:
/*
 * change handler to PIO
-- 
1.9.1



[PATCH/RFC 0/5] usb: gadget: add new APIs of udc-core and modify renesas_usbhs for IPMMU

2016-04-05 Thread Yoshihiro Shimoda
This patch set is based on the latest Felipe's usb.git / testing/next
branch. (commit id = eac6b9922641f88a7da87a145d6ad9bed706c9ec)

I'm not sure this is a right way for using IOMMU driver on udc driver.
So, I marked this patch set as RFC :)

Yoshihiro Shimoda (5):
  usb: gadget: udc: core: Fix argument of dev_err() in
usb_gadget_map_request()
  usb: gadget: udc: core: add usb_gadget_{un}map_request_by_dev()
  usb: renesas_usbhs: change function call orfer in
usbhsf_dma_prepare_push()
  usb: renesas_usbhs: change arguments of dma_map_ctrl()
  usb: renesas_usbhs: use usb_gadget_{un}map_request_by_dev() for IPMMU

 drivers/usb/gadget/udc/udc-core.c  | 26 +++---
 drivers/usb/renesas_usbhs/fifo.c   | 16 +---
 drivers/usb/renesas_usbhs/mod_gadget.c |  9 -
 drivers/usb/renesas_usbhs/mod_host.c   |  3 ++-
 drivers/usb/renesas_usbhs/pipe.c   |  3 ++-
 drivers/usb/renesas_usbhs/pipe.h   |  6 --
 include/linux/usb/gadget.h |  4 
 7 files changed, 44 insertions(+), 23 deletions(-)

-- 
1.9.1



Re: [PATCH 1/2] arm64: renesas: r8a7795: Add PCIe nodes

2016-04-05 Thread Geert Uytterhoeven
Hi Phil,

On Tue, Apr 5, 2016 at 10:56 AM, Phil Edworthy
 wrote:
> Signed-off-by: Phil Edworthy 

Thanks for your patch!

Unfortunately you seem to have missed my earlier review comments.

> ---
>  arch/arm64/boot/dts/renesas/r8a7795.dtsi | 58 
> 
>  1 file changed, 58 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi 
> b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> index 868c10e..6cfc248 100644
> --- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> @@ -131,6 +131,15 @@
> status = "disabled";
> };
>
> +   /* External PCIe clock - can be overridden by the board */
> +   pcie_bus_clk: pcie_bus_clk {

Please drop the "_clk" suffix from the device node's name.

> +   compatible = "fixed-clock";
> +   #clock-cells = <0>;
> +   clock-frequency = <1>;
> +   clock-output-names = "pcie_bus";

The "clock-output-names" property is optional and not needed. Please drop it,
the clock will be named after the device node's name.

> +   status = "disabled";
> +   };
> +
> soc {
> compatible = "simple-bus";
> interrupt-parent = <>;
> @@ -1156,5 +1165,54 @@
> power-domains = <>;
> status = "disabled";
> };
> +   pciec0: pcie@fe00 {
> +   compatible = "renesas,pcie-r8a7795";
> +   reg = <0 0xfe00 0 0x8>;
> +   #address-cells = <3>;
> +   #size-cells = <2>;
> +   bus-range = <0x00 0xff>;
> +   device_type = "pci";
> +   ranges = <0x0100 0 0x 0 0xfe10 0 
> 0x0010
> +   0x0200 0 0xfe20 0 0xfe20 0 
> 0x0020
> +   0x0200 0 0x3000 0 0x3000 0 
> 0x0800
> +   0x4200 0 0x3800 0 0x3800 0 
> 0x0800>;
> +   /* Map all possible DDR as inbound ranges */
> +   dma-ranges = <0x4200 0 0x4000 0 0x4000 0 
> 0x4000>;
> +   interrupts = <0 116 IRQ_TYPE_LEVEL_HIGH>,
> +   <0 117 IRQ_TYPE_LEVEL_HIGH>,
> +   <0 118 IRQ_TYPE_LEVEL_HIGH>;

 (x3)

> +   #interrupt-cells = <1>;
> +   interrupt-map-mask = <0 0 0 0>;
> +   interrupt-map = <0 0 0 0  0 116 
> IRQ_TYPE_LEVEL_HIGH>;

...  GIC_SPI ...

> +   clocks = < CPG_MOD 319>, <_bus_clk>;
> +   clock-names = "pcie", "pcie_bus";
> +   power-domains = <>;
> +   status = "disabled";
> +   };
> +
> +   pciec1: pcie@ee80 {
> +   compatible = "renesas,pcie-r8a7795";
> +   reg = <0 0xee80 0 0x8>;
> +   #address-cells = <3>;
> +   #size-cells = <2>;
> +   bus-range = <0x00 0xff>;
> +   device_type = "pci";
> +   ranges = <0x0100 0 0x 0 0xee90 0 
> 0x0010
> +   0x0200 0 0xeea0 0 0xeea0 0 
> 0x0020
> +   0x0200 0 0xc000 0 0xc000 0 
> 0x0800
> +   0x4200 0 0xc800 0 0xc800 0 
> 0x0800>;
> +   /* Map all possible DDR as inbound ranges */
> +   dma-ranges = <0x4200 0 0x4000 0 0x4000 0 
> 0x4000>;
> +   interrupts = <0 148 IRQ_TYPE_LEVEL_HIGH>,
> +   <0 149 IRQ_TYPE_LEVEL_HIGH>,
> +   <0 150 IRQ_TYPE_LEVEL_HIGH>;

 (x3)

> +   #interrupt-cells = <1>;
> +   interrupt-map-mask = <0 0 0 0>;
> +   interrupt-map = <0 0 0 0  0 148 
> IRQ_TYPE_LEVEL_HIGH>;

...  GIC_SPI ...

> +   clocks = < CPG_MOD 318>, <_bus_clk>;
> +   clock-names = "pcie", "pcie_bus";
> +   power-domains = <>;
> +   status = "disabled";
> +   };
> };
>  };

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


[PATCH 1/2] arm64: renesas: r8a7795: Add PCIe nodes

2016-04-05 Thread Phil Edworthy
Signed-off-by: Phil Edworthy 
---
 arch/arm64/boot/dts/renesas/r8a7795.dtsi | 58 
 1 file changed, 58 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi 
b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
index 868c10e..6cfc248 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
@@ -131,6 +131,15 @@
status = "disabled";
};
 
+   /* External PCIe clock - can be overridden by the board */
+   pcie_bus_clk: pcie_bus_clk {
+   compatible = "fixed-clock";
+   #clock-cells = <0>;
+   clock-frequency = <1>;
+   clock-output-names = "pcie_bus";
+   status = "disabled";
+   };
+
soc {
compatible = "simple-bus";
interrupt-parent = <>;
@@ -1156,5 +1165,54 @@
power-domains = <>;
status = "disabled";
};
+   pciec0: pcie@fe00 {
+   compatible = "renesas,pcie-r8a7795";
+   reg = <0 0xfe00 0 0x8>;
+   #address-cells = <3>;
+   #size-cells = <2>;
+   bus-range = <0x00 0xff>;
+   device_type = "pci";
+   ranges = <0x0100 0 0x 0 0xfe10 0 
0x0010
+   0x0200 0 0xfe20 0 0xfe20 0 
0x0020
+   0x0200 0 0x3000 0 0x3000 0 
0x0800
+   0x4200 0 0x3800 0 0x3800 0 
0x0800>;
+   /* Map all possible DDR as inbound ranges */
+   dma-ranges = <0x4200 0 0x4000 0 0x4000 0 
0x4000>;
+   interrupts = <0 116 IRQ_TYPE_LEVEL_HIGH>,
+   <0 117 IRQ_TYPE_LEVEL_HIGH>,
+   <0 118 IRQ_TYPE_LEVEL_HIGH>;
+   #interrupt-cells = <1>;
+   interrupt-map-mask = <0 0 0 0>;
+   interrupt-map = <0 0 0 0  0 116 
IRQ_TYPE_LEVEL_HIGH>;
+   clocks = < CPG_MOD 319>, <_bus_clk>;
+   clock-names = "pcie", "pcie_bus";
+   power-domains = <>;
+   status = "disabled";
+   };
+
+   pciec1: pcie@ee80 {
+   compatible = "renesas,pcie-r8a7795";
+   reg = <0 0xee80 0 0x8>;
+   #address-cells = <3>;
+   #size-cells = <2>;
+   bus-range = <0x00 0xff>;
+   device_type = "pci";
+   ranges = <0x0100 0 0x 0 0xee90 0 
0x0010
+   0x0200 0 0xeea0 0 0xeea0 0 
0x0020
+   0x0200 0 0xc000 0 0xc000 0 
0x0800
+   0x4200 0 0xc800 0 0xc800 0 
0x0800>;
+   /* Map all possible DDR as inbound ranges */
+   dma-ranges = <0x4200 0 0x4000 0 0x4000 0 
0x4000>;
+   interrupts = <0 148 IRQ_TYPE_LEVEL_HIGH>,
+   <0 149 IRQ_TYPE_LEVEL_HIGH>,
+   <0 150 IRQ_TYPE_LEVEL_HIGH>;
+   #interrupt-cells = <1>;
+   interrupt-map-mask = <0 0 0 0>;
+   interrupt-map = <0 0 0 0  0 148 
IRQ_TYPE_LEVEL_HIGH>;
+   clocks = < CPG_MOD 318>, <_bus_clk>;
+   clock-names = "pcie", "pcie_bus";
+   power-domains = <>;
+   status = "disabled";
+   };
};
 };
-- 
2.5.0