Re: [linux-sunxi] [PATCH] ARM: dts: sun7i: Enable USB DRC on pcDuino v3 Nano

2015-10-18 Thread Hans de Goede

Hi,

On 10/18/2015 12:08 AM, Adam Sampson wrote:

The OTG arrangement on the LinkSprite pcDuino v3 Nano is the same as the
pcDuino 1/2/3: the OTG port's 5V line is connected directly to the 5V
bus (it's not switchable), and the OTG port's ID pin is connected to PH4
on the A20.

Tested successfully in both host and device modes.

Signed-off-by: Adam Sampson 


Looks good: Acked-by: Hans de Goede 

Regards,

Hans



---
  arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts | 19 +++
  1 file changed, 19 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts 
b/arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts
index beac431..1757a6a 100644
--- a/arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts
+++ b/arch/arm/boot/dts/sun7i-a20-pcduino3-nano.dts
@@ -142,6 +142,10 @@
status = "okay";
  };

+_sram {
+   status = "okay";
+};
+
   {
ahci_pwr_pin_pcduino3_nano: ahci_pwr_pin@0 {
allwinner,pins = "PH2";
@@ -157,6 +161,13 @@
allwinner,pull = ;
};

+   usb0_id_detect_pin: usb0_id_detect_pin@0 {
+   allwinner,pins = "PH4";
+   allwinner,function = "gpio_in";
+   allwinner,drive = ;
+   allwinner,pull = ;
+   };
+
usb1_vbus_pin_pcduino3_nano: usb1_vbus_pin@0 {
allwinner,pins = "PD2";
allwinner,function = "gpio_out";
@@ -211,7 +222,15 @@
status = "okay";
  };

+_otg {
+   dr_mode = "otg";
+   status = "okay";
+};
+
   {
+   pinctrl-names = "default";
+   pinctrl-0 = <_id_detect_pin>;
+   usb0_id_det-gpio = < 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
usb1_vbus-supply = <_usb1_vbus>;
usb2_vbus-supply = <_usb1_vbus>;
status = "okay";



--
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] Updated manual build howto and device page suggestion.

2015-10-18 Thread Luc Verhaegen
Hi,

Since our current world is one where people like me and Alejandro are 
not able to spend that much time on sunxi anymore, and one where the 
upstream support has advanced massively, it is high time to update our 
wiki.

Since i am giving my lime board an actual purpose, i adjusted the lime 
page's (http://linux-sunxi.org/Olimex_A10-OLinuXino-Lime) Manual build 
section to be more in touch with the current reality.

I have reduced the information under the manual build section to only 
show the relevant build targets or board config files. This reduces the 
chance of people taking shortcuts and getting lost, instead of using the 
manual build howto. It also reduces the chance of device pages becoming 
out of date.

I have also restructured the manual build howto to clearly show the 
difference between sunxi/legacy and upstream/mainline. Not all children 
of the manual build howto are properly updated yet, but now that at 
least the direction should be clearer.

Since it is the weekend and we have become more incorporated this last 
year or so, feedback on irc has so far been limited. So more feedback 
welcomed.

Thanks,

Luc Verhaegen.

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [PATCH] dts: sun6i: yones toptech bs1078 v2: Add AXP221 support to dts

2015-10-18 Thread Lawrence Yu
On Fri, Oct 16, 2015 at 12:51 AM, Chen-Yu Tsai  wrote:

> Hi,
>
> On Fri, Oct 9, 2015 at 1:06 PM, Lawrence Yu  wrote:
> > From: lyu 
> >
> > Enable the axp221 PMIC chip in the dts file.
> > Allows board to power off correctly from the poweroff command
> >
> > Tested on Contixo Q102 Tablet which uses the yones toptech bs1078 v2 pcb.
> > ---
> >  .../dts/sun6i-a31s-yones-toptech-bs1078-v2.dts | 86
> ++
> >  1 file changed, 86 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts
> b/arch/arm/boot/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts
> > index b199020..57bc315 100644
> > --- a/arch/arm/boot/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts
> > +++ b/arch/arm/boot/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts
> > @@ -113,6 +113,92 @@
> > allwinner,pull = ;
> >  };
> >
> > + {
> > +   status = "okay";
> > +
> > +   axp221: pmic@68 {
> > +   compatible = "x-powers,axp221";
> > +   reg = <0x68>;
> > +   interrupt-parent = <_intc>;
> > +   interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
> > +   interrupt-controller;
> > +   #interrupt-cells = <1>;
> > +   dcdc1-supply = <_3v0>;
> > +   dcdc5-supply = <_dram>;
> > +
> > +   regulators {
>
> We now have axp22x.dtsi in sunxi-next. Can you incorporate that instead?
>
>
Not a problem.  Thank you taking the time to review the patch.

I will send out a v2 shortly that uses the axp22x.dtsi file.



> See sun6i-a31-hummingbird.dts for an example.
>
> Thanks!
>
> ChenYu
>
> --
> You received this message because you are subscribed to the Google Groups
> "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to linux-sunxi+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] [PATCH v2 1/1] dts: sun6i: yones toptech bs1078 v2: Add AXP221 support to dts

2015-10-18 Thread Lawrence Yu
Enable the axp221 PMIC chip in the dts file.

Allows board to power off correctly from the poweroff command

This board requires dc1sw to be enabled in order to provide a power source
for the 5V DCDC converter that powers USB2 and the LCD backlight

This board uses dldo1 for 3.3V wifi power

This board requires dldo3 to be enabled at 2.8V in order to provide voltage
to the pullup resistors for the i2c0 bus.

---

Changes since v1

- Use axp22x.dtsi to standardize the register names
- Change wifi power regulator to dldo1 instead of incorrect aldo1
- Remove unnecessary gpio pin PH27 for wifi power, since this board uses
  the axp221 chip to control power to the wifi chip.

Signed-off-by: Lawrence Yu 
---
 .../dts/sun6i-a31s-yones-toptech-bs1078-v2.dts | 98 +++---
 1 file changed, 88 insertions(+), 10 deletions(-)

diff --git a/arch/arm/boot/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts 
b/arch/arm/boot/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts
index b199020..98d0a83 100644
--- a/arch/arm/boot/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts
+++ b/arch/arm/boot/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts
@@ -113,22 +113,100 @@
allwinner,pull = ;
 };
 
-_usb1_vbus {
-   gpio = < 7 27 GPIO_ACTIVE_HIGH>;
+ {
+   pinctrl-names = "default";
+   pinctrl-0 = <_pins_a>;
status = "okay";
 };
 
-_vbus_pin_a {
-   allwinner,pins = "PH27";
+ {
+   status = "okay";
+
+   axp22x: pmic@68 {
+   compatible = "x-powers,axp221";
+   reg = <0x68>;
+   interrupt-parent = <_intc>;
+   interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+   };
 };
 
- {
-   usb1_vbus-supply = <_usb1_vbus>;
-   status = "okay";
+#include "axp22x.dtsi"
+
+ {
+   regulators {
+   /* Used by LCD backlight and USB2 */
+   reg_dc1sw: dc1sw {
+   regulator-name = "dc1sw";
+   regulator-min-microvolt = <300>;
+   regulator-max-microvolt = <300>;
+   regulator-name = "vcc-dc1sw";
+   };
+   };
 };
 
- {
-   pinctrl-names = "default";
-   pinctrl-0 = <_pins_a>;
+_aldo3 {
+   regulator-always-on;
+   regulator-min-microvolt = <270>;
+   regulator-max-microvolt = <330>;
+   regulator-name = "avcc";
+};
+
+_dc5ldo {
+   regulator-min-microvolt = <70>;
+   regulator-max-microvolt = <132>;
+   regulator-name = "vdd-cpus";
+};
+
+_dcdc1 {
+   regulator-always-on;
+   regulator-min-microvolt = <300>;
+   regulator-max-microvolt = <300>;
+   regulator-name = "vcc-3v0";
+};
+
+_dcdc2 {
+   regulator-min-microvolt = <70>;
+   regulator-max-microvolt = <132>;
+   regulator-name = "vdd-gpu";
+};
+
+_dcdc3 {
+   regulator-always-on;
+   regulator-min-microvolt = <70>;
+   regulator-max-microvolt = <132>;
+   regulator-name = "vdd-cpu";
+};
+
+_dcdc4 {
+   regulator-always-on;
+   regulator-min-microvolt = <70>;
+   regulator-max-microvolt = <132>;
+   regulator-name = "vdd-sys-dll";
+};
+
+_dcdc5 {
+   regulator-always-on;
+   regulator-min-microvolt = <150>;
+   regulator-max-microvolt = <150>;
+   regulator-name = "vcc-dram";
+};
+
+_dldo1 {
+   regulator-min-microvolt = <330>;
+   regulator-max-microvolt = <330>;
+   regulator-name = "vcc-wifi";
+};
+
+/* Voltage source for I2C pullup resistors for I2C Bus 0 */
+_dldo3 {
+   regulator-always-on;
+   regulator-min-microvolt = <280>;
+   regulator-max-microvolt = <280>;
+   regulator-name = "vcc-csi";
+};
+
+ {
+   usb1_vbus-supply = <_dldo1>;
+   usb2_vbus-supply = <_dc1sw>;
status = "okay";
 };
-- 
2.5.3

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.