Re: [PATCH 5/6] ARM: LG Optimus Black (P970) codename sniper support, with basic features

2015-12-24 Thread Paul Kocialkowski
Hi,

Le mercredi 23 décembre 2015 à 07:44 -0800, Tony Lindgren a écrit :
> * Paul Kocialkowski  [151223 03:00]:
> > + {
> > +   ti,no-reset-on-init;
> > +};
> > +
> > + {
> > +   ti,no-reset-on-init;
> > +};
> > +
> > + {
> > +   ti,no-reset-on-init;
> > +};
> > +
> > + {
> > +   ti,no-reset-on-init;
> > +};
> > +
> > + {
> > +   ti,no-reset-on-init;
> > +};
> > +
> > + {
> > +   ti,no-reset-on-init;
> > +};
> 
> Care to try to narrow down exactly which GPIO(s) need to be preserved?
> Chances are this will unnecessarily block deeper idle states in hardware
> otherwise.
> 
> My guess is that the GPIO pins that need to be preserved if any are in
> the GPIO bank 1 as that's always powered..

Well, I actually need to keep the GPIOs handling backlight control,
buttons LEDs and the micro USB connector muxing (which can be set to
UART or USB). Those are spread accross gpio2, gpio5 and gpio6, so I'll
only enable these in v2.

Thanks for the review!

-- 
Paul Kocialkowski, Replicant developer

Replicant is a fully free Android distribution running on several
devices, a free software mobile operating system putting the emphasis on
freedom and privacy/security.

Website: https://www.replicant.us/
Blog: https://blog.replicant.us/
Wiki/tracker/forums: https://redmine.replicant.us/



signature.asc
Description: This is a digitally signed message part


Re: [PATCH 5/6] ARM: LG Optimus Black (P970) codename sniper support, with basic features

2015-12-24 Thread Paul Kocialkowski
Hi,

Le mercredi 23 décembre 2015 à 13:03 -0300, Javier Martinez Canillas a
écrit :
> Hello Paul,
> 
> [snip]
> 
> > +
> > +_pmx_core {
> > +   pinctrl-names = "default";
> > +
> > +   uart3_pins: pinmux_uart3_pins {
> > +   pinctrl-single,pins = <
> > +   0x16e (PIN_INPUT | MUX_MODE0)   /* 
> > uart3_rx_irrx */
> > +   0x170 (PIN_OUTPUT | MUX_MODE0)  /* 
> > uart3_tx_irtx */
> > +   >;
> 
> Could you please use the IOPAD mux macros from
> include/dt-bindings/pinctrl/omap.h instead?
> 
> We just did a massive cleanup on the OMAP DTS to use them instead of
> an offset from the padconf registers.

Sure thing, will do in v2.

Thanks for the review!

-- 
Paul Kocialkowski, Replicant developer

Replicant is a fully free Android distribution running on several
devices, a free software mobile operating system putting the emphasis on
freedom and privacy/security.

Website: https://www.replicant.us/
Blog: https://blog.replicant.us/
Wiki/tracker/forums: https://redmine.replicant.us/



signature.asc
Description: This is a digitally signed message part


Re: [PATCH 5/6] ARM: LG Optimus Black (P970) codename sniper support, with basic features

2015-12-23 Thread Tony Lindgren
Hi,

* Paul Kocialkowski  [151223 03:00]:
> The LG Optimus Black (P970) codename sniper is a smartphone that was designed
> and manufactured by LG Electronics (LGE) and released back in 2011.
> It is using an OMAP3630 SoC, GP version.
> 
> This adds devicetree support for the device, with only a few basic features
> supported, such as debug uart, i2c, internal emmc and external mmc.

Cool :)

> + {
> + ti,no-reset-on-init;
> +};
> +
> + {
> + ti,no-reset-on-init;
> +};
> +
> + {
> + ti,no-reset-on-init;
> +};
> +
> + {
> + ti,no-reset-on-init;
> +};
> +
> + {
> + ti,no-reset-on-init;
> +};
> +
> + {
> + ti,no-reset-on-init;
> +};

Care to try to narrow down exactly which GPIO(s) need to be preserved?
Chances are this will unnecessarily block deeper idle states in hardware
otherwise.

My guess is that the GPIO pins that need to be preserved if any are in
the GPIO bank 1 as that's always powered..

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 5/6] ARM: LG Optimus Black (P970) codename sniper support, with basic features

2015-12-23 Thread Javier Martinez Canillas
Hello Paul,

[snip]

> +
> +_pmx_core {
> +   pinctrl-names = "default";
> +
> +   uart3_pins: pinmux_uart3_pins {
> +   pinctrl-single,pins = <
> +   0x16e (PIN_INPUT | MUX_MODE0)   /* 
> uart3_rx_irrx */
> +   0x170 (PIN_OUTPUT | MUX_MODE0)  /* 
> uart3_tx_irtx */
> +   >;

Could you please use the IOPAD mux macros from
include/dt-bindings/pinctrl/omap.h instead?

We just did a massive cleanup on the OMAP DTS to use them instead of
an offset from the padconf registers.

Best regards,
Javier
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 5/6] ARM: LG Optimus Black (P970) codename sniper support, with basic features

2015-12-23 Thread Paul Kocialkowski
The LG Optimus Black (P970) codename sniper is a smartphone that was designed
and manufactured by LG Electronics (LGE) and released back in 2011.
It is using an OMAP3630 SoC, GP version.

This adds devicetree support for the device, with only a few basic features
supported, such as debug uart, i2c, internal emmc and external mmc.

Signed-off-by: Paul Kocialkowski 
---
 arch/arm/boot/dts/Makefile |   1 +
 arch/arm/boot/dts/omap3-sniper.dts | 220 +
 2 files changed, 221 insertions(+)
 create mode 100644 arch/arm/boot/dts/omap3-sniper.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 30bbc37..2c71106 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -447,6 +447,7 @@ dtb-$(CONFIG_ARCH_OMAP3) += \
omap3-sbc-t3517.dtb \
omap3-sbc-t3530.dtb \
omap3-sbc-t3730.dtb \
+   omap3-sniper.dtb \
omap3-thunder.dtb \
omap3-zoom3.dtb
 dtb-$(CONFIG_SOC_TI81XX) += \
diff --git a/arch/arm/boot/dts/omap3-sniper.dts 
b/arch/arm/boot/dts/omap3-sniper.dts
new file mode 100644
index 000..6c2d99a
--- /dev/null
+++ b/arch/arm/boot/dts/omap3-sniper.dts
@@ -0,0 +1,220 @@
+/*
+ * Copyright (C) 2015 Paul Kocialkowski 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+/dts-v1/;
+
+#include "omap36xx.dtsi"
+
+/ {
+   model = "LG Optimus Black (P970)";
+   compatible = "lge,omap3-sniper", "ti,omap36xx", "ti,omap3";
+
+   cpus {
+   cpu@0 {
+   cpu0-supply = <>;
+   };
+   };
+
+   memory {
+   device_type = "memory";
+   reg = <0x8000 0x2000>; /* 512 MB */
+   };
+};
+
+_pmx_core {
+   pinctrl-names = "default";
+
+   uart3_pins: pinmux_uart3_pins {
+   pinctrl-single,pins = <
+   0x16e (PIN_INPUT | MUX_MODE0)   /* 
uart3_rx_irrx */
+   0x170 (PIN_OUTPUT | MUX_MODE0)  /* 
uart3_tx_irtx */
+   >;
+   };
+
+   i2c1_pins: pinmux_i2c1_pins {
+   pinctrl-single,pins = <
+   0x18a (PIN_INPUT_PULLUP | MUX_MODE0)/* i2c1_scl */
+   0x18c (PIN_INPUT_PULLUP | MUX_MODE0)/* i2c1_sda */
+   >;
+   };
+
+   i2c2_pins: pinmux_i2c2_pins {
+   pinctrl-single,pins = <
+   0x18e (PIN_INPUT | MUX_MODE0)   /* i2c2_scl */
+   0x190 (PIN_INPUT | MUX_MODE0)   /* i2c2_sda */
+   >;
+   };
+
+   i2c3_pins: pinmux_i2c3_pins {
+   pinctrl-single,pins = <
+   0x192 (PIN_INPUT | MUX_MODE0)   /* i2c3_scl */
+   0x194 (PIN_INPUT | MUX_MODE0)   /* i2c3_sda */
+   >;
+   };
+
+   lp8720_en_pin: pinmux_lp8720_en_pin {
+   pinctrl-single,pins = <
+   0x80 (PIN_OUTPUT | MUX_MODE4)   /* gpio_37 */
+   >;
+   };
+
+   mmc1_pins: pinmux_mmc1_pins {
+   pinctrl-single,pins = <
+   0x114 (PIN_INPUT | MUX_MODE0)   /* sdmmc1_clk */
+   0x116 (PIN_INPUT | MUX_MODE0)   /* sdmmc1_cmd */
+   0x118 (PIN_INPUT | MUX_MODE0)   /* sdmmc1_dat0 
*/
+   0x11a (PIN_INPUT | MUX_MODE0)   /* sdmmc1_dat1 
*/
+   0x11c (PIN_INPUT | MUX_MODE0)   /* sdmmc1_dat2 
*/
+   0x11e (PIN_INPUT | MUX_MODE0)   /* sdmmc1_dat3 
*/
+   >;
+   };
+
+   mmc2_pins: pinmux_mmc2_pins {
+   pinctrl-single,pins = <
+   0x128 (PIN_INPUT | MUX_MODE0)   /* sdmmc2_clk */
+   0x12a (PIN_INPUT | MUX_MODE0)   /* sdmmc2_cmd */
+   0x12c (PIN_INPUT | MUX_MODE0)   /* sdmmc2_dat0 
*/
+   0x12e (PIN_INPUT | MUX_MODE0)   /* sdmmc2_dat1 
*/
+   0x130 (PIN_INPUT | MUX_MODE0)   /* sdmmc2_dat2 
*/
+   0x132 (PIN_INPUT | MUX_MODE0)   /* sdmmc2_dat3 
*/
+   0x134 (PIN_INPUT | MUX_MODE0)   /* sdmmc2_dat4 
*/
+   0x136 (PIN_INPUT | MUX_MODE0)   /* sdmmc2_dat5 
*/
+   0x138 (PIN_INPUT | MUX_MODE0)   /* sdmmc2_dat6 
*/
+   0x13a (PIN_INPUT | MUX_MODE0)   /* sdmmc2_dat7 
*/
+   >;
+   };
+};
+
+_pmx_wkup {
+   pinctrl-names = "default";
+
+   mmc1_cd_pin: pinmux_mmc1_cd_pin {
+   pinctrl-single,pins = <
+   0x1a (PIN_INPUT | MUX_MODE4)/* gpio_10 */
+   >;
+