Re: [linux-sunxi] Re: [PATCH] ARM: dts: sun4i: Add dts file for the pov protab2-ips9 tablet
Hi, On 06-09-15 18:30, Maxime Ripard wrote: On Sat, Sep 05, 2015 at 10:21:59AM +0200, Hans de Goede wrote: The Point of View protab2-ips9 is a tablet with a 9" ips 1024x768 lcd screen, microsd slot, headphones, mini hdmi, mini usb b and power barrel connectors. It uses a rtl8188cus usb wifi chip and a RDA 5875Y bluetooth chip attached to uart2. It has a bma250 accelerometer attached to i2c1 addr 0x18. It has a pixcir,pixcir_tangoc compatible touchscreen attached to i2c2 addr 0x5c. This is not enabled in this dts, because this variant of the pixcir_tangoc has separate wakeup and enable pins both of which need to be driven low before the touchscreen will work. Before we can enable this the pixcir driver and devicetree-bindings need to be extended to support these pins. Signed-off-by: Hans de Goede--- arch/arm/boot/dts/Makefile | 3 +- arch/arm/boot/dts/sun4i-a10-pov-protab2-ips9.dts | 209 +++ 2 files changed, 211 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/sun4i-a10-pov-protab2-ips9.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index e981fd6..c08883c 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -561,7 +561,8 @@ dtb-$(CONFIG_MACH_SUN4I) += \ sun4i-a10-mk802.dtb \ sun4i-a10-mk802ii.dtb \ sun4i-a10-olinuxino-lime.dtb \ - sun4i-a10-pcduino.dtb + sun4i-a10-pcduino.dtb \ + sun4i-a10-pov-protab2-ips9.dtb dtb-$(CONFIG_MACH_SUN5I) += \ sun5i-a10s-auxtek-t003.dtb \ sun5i-a10s-auxtek-t004.dtb \ diff --git a/arch/arm/boot/dts/sun4i-a10-pov-protab2-ips9.dts b/arch/arm/boot/dts/sun4i-a10-pov-protab2-ips9.dts new file mode 100644 index 000..223515e --- /dev/null +++ b/arch/arm/boot/dts/sun4i-a10-pov-protab2-ips9.dts @@ -0,0 +1,209 @@ +/* + * Copyright 2015 Hans de Goede + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This file is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This file is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Or, alternatively, + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +/dts-v1/; +#include "sun4i-a10.dtsi" +#include "sunxi-common-regulators.dtsi" +#include +#include +#include +#include + +/ { + model = "Point of View Protab2-IPS9"; + compatible = "pov,protab2-ips9", "allwinner,sun4i-a10"; + + aliases { + serial0 = + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; +}; + + { + cpu-supply = <_dcdc2>; +}; + + { + status = "okay"; +}; + + { + pinctrl-names = "default"; + pinctrl-0 = <_pins_a>; + status = "okay"; + + axp209: pmic@34 { + reg = <0x34>; + interrupts = <0>; + }; +}; + +#include "axp209.dtsi" + + { + pinctrl-names = "default"; + pinctrl-0 = <_pins_a>; + status = "okay"; +}; + + { + pinctrl-names = "default"; + pinctrl-0 = <_pins_a>; + status = "okay"; +}; + + { + vref-supply = <_ldo2>; + status = "okay"; + + button@400 { + label = "Volume Up"; + linux,code = ; + channel = <0>; +
Re: [linux-sunxi] Re: [RFC] mmc: core: Set clock before switching to highspeed mode.
Hi, On 06-09-15 16:47, Yousong Zhou wrote: On Sep 6, 2015 10:14 PM, "Shawn Lin"wrote: 在 2015/9/6 20:09, Yousong Zhou 写道: Hi, On 6 September 2015 at 08:12, Shawn Lin wrote: On 2015/9/5 22:58, Hans de Goede wrote: Hi Shawn Lin, On 05-09-15 16:07, Shawn Lin wrote: On 2015/9/5 18:19, Yousong Zhou wrote: A SD card with sunxi-mmc can fail with the following error message (RCD for response CRC error) when trying to switch to highspeed mode. Setting the bus clock before the access mode switch fixed it. No, that's wrong! Before this card is switched to highspeed, it works under identification mode(From spec: bus clock <= 400KHz). How could you raise bus clock to higher clk rate which I _guess_ is 52MHz before you notify sd cards to run into highspeed mode? Althought it works for this card, this patch will not please the other cards that they might not reply CMDs any longer including the following CMD6. Thanks for the feedback, this is exactly why I asked Yousong Zhou to take this to the mmc list. So if this is not the proper fix for the problem that Yousong Zhou is seeing, then what might be the proper fix ? From my knowledge of mmc, there hadn't have a way to deal with this "broken" case. In another word, IMO,it's ANTI-SPEC. We can't be too spec sometimes, but at least we shouldn't violate it. Maybe the fix is anti-spec. But the fact is that the card works on many other platforms with the builtin card reader (not through an USB adapter), including Mac OS X, my old Nokia Symbian phone, and Windows. Could it be that the sunxi-mmc is doing some things in the wrong order when changing the clock, or is this all under control of the mmc core ? all of this is under control of the mmc core. So if Yongsong does want this card to work for any linux-based mmc stack, I guess something like that should be "better"? if (switch to HS fail) { set_bus_clk goto retry switch to HS } BUT...I admit it seems strange as well. The SD Specification (simplified version) says "If CRC error occurs on the status data, the host should issue a power cycle.", so I guess the above approach is anti-spec in some way :) Right,I was guessing that way from your intention. In case it may help debug this problem, I'd like to add that the card previously worked fine with U-Boot before commit [1]. This can also be confirmed by Debian Jessie installer image with which the old U-Boot there worked fine while the kernel (3.16) did not. [1] sunxi: mmc: Properly setup mod-clk and clock sampling phases, http://git.denx.de/?p=u-boot.git;a=commit;h=fc3a832576ce7bb597b1823935bfb7dcca235c3c Interesting, one thing that patch does is introduce a switch from parent pll when switching from 400KHz to higher clocks. Can you try the attached patch ? If reverting u-boot commit fc3a832576ce7bb597b1823935bfb7dcca235c3c fixes things, then it is probably best to focus on fixing u-boot first, and then we can likely apply the same fix to the kernel. With which SoC(s) are you seeing this problem ? I believe that there may be some differences between the mmc controller used in the A10/13 vs later SoCs so this may be a SoC specific issue. Regards, Hans OpenWrt ticket 20387 has more info about the U-Boot failure. https://dev.openwrt.org/ticket/20387 Anyway, I have no idea what's the effect of those magic numbers on "sampling phases". Never played with such things before :) I happended to fix some problems which seems *similar* to yours(but I'm not sure just from commit[1]'s msg): https://patchwork.kernel.org/patch/7119661/ Cheers yousong -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- Best Regards Shawn Lin -- 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. >From 1523e6fbd27b5da22b0c3cb4e8eda50bce7562cf Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 7 Sep 2015 08:56:52 +0200 Subject: [PATCH] sunxi: mmc: Add a delay after changing the PLL to allow clock to stabilize Signed-off-by: Hans de Goede --- drivers/mmc/sunxi_mmc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c index 25f18ad..db3c489 100644 --- a/drivers/mmc/sunxi_mmc.c
Re: [linux-sunxi] Re: [PATCH] ARM: dts: sun4i: Add dts file for the pov protab2-ips9 tablet
Hi, On 07-09-15 09:49, Priit Laes wrote: On Mon, 2015-09-07 at 09:05 +0200, Hans de Goede wrote: Hi, On 06-09-15 18:30, Maxime Ripard wrote: On Sat, Sep 05, 2015 at 10:21:59AM +0200, Hans de Goede wrote: The Point of View protab2-ips9 is a tablet with a 9" ips 1024x768 lcd screen, microsd slot, headphones, mini hdmi, mini usb b and power barrel connectors. It uses a rtl8188cus usb wifi chip and a RDA 5875Y bluetooth chip attached to uart2. It has a bma250 accelerometer attached to i2c1 addr 0x18. [...] What is connected on i2c1 ? Just the camera sensor? or it has some other devices there? The bma250 accelerometer sits there, and the kernel already has a driver for it. That driver needs to have devicetree binding support added, and then we should be able to use the accelerometer. bma250 already has devicetree support. It is used in Gemei G9 tablet (sun4i-gemei-g9.dts). Yes I've seen that, but does it actually work? I've not tried but I do not see any compatible string in the actual bma250 code in the kernel, so I believe that this part of the sun4i-gemei-g9.dts file does not work ? Regards, Hans -- 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] Re: [PATCH] ARM: dts: sun4i: Add dts file for the pov protab2-ips9 tablet
Hi, On 07-09-15 11:14, Priit Laes wrote: On Mon, 2015-09-07 at 10:49 +0200, Hans de Goede wrote: Hi, On 07-09-15 09:49, Priit Laes wrote: On Mon, 2015-09-07 at 09:05 +0200, Hans de Goede wrote: Hi, On 06-09-15 18:30, Maxime Ripard wrote: On Sat, Sep 05, 2015 at 10:21:59AM +0200, Hans de Goede wrote: The Point of View protab2-ips9 is a tablet with a 9" ips 1024x768 lcd screen, microsd slot, headphones, mini hdmi, mini usb b and power barrel connectors. It uses a rtl8188cus usb wifi chip and a RDA 5875Y bluetooth chip attached to uart2. It has a bma250 accelerometer attached to i2c1 addr 0x18. [...] What is connected on i2c1 ? Just the camera sensor? or it has some other devices there? The bma250 accelerometer sits there, and the kernel already has a driver for it. That driver needs to have devicetree binding support added, and then we should be able to use the accelerometer. bma250 already has devicetree support. It is used in Gemei G9 tablet (sun4i-gemei-g9.dts). Yes I've seen that, but does it actually work? I've not tried but I do not see any compatible string in the actual bma250 code in the kernel, so I believe that this part of the sun4i-gemei-g9.dts file does not work ? It worked (even without IRQs) when I submitted the patch. Driver itself is under iio/accel/bma180.c That is really weird, because: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/iio/accel/bma180.c Does not have an of_match_table ... ?? Regards, Hans -- 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] Re: [PATCH] ARM: dts: sun4i: Add dts file for the pov protab2-ips9 tablet
On Mon, 2015-09-07 at 09:05 +0200, Hans de Goede wrote: > Hi, > > On 06-09-15 18:30, Maxime Ripard wrote: > > On Sat, Sep 05, 2015 at 10:21:59AM +0200, Hans de Goede wrote: > > > The Point of View protab2-ips9 is a tablet with a 9" ips 1024x768 > > > lcd screen, > > > microsd slot, headphones, mini hdmi, mini usb b and power barrel > > > connectors. > > > > > > It uses a rtl8188cus usb wifi chip and a RDA 5875Y bluetooth chip > > > attached > > > to uart2. It has a bma250 accelerometer attached to i2c1 addr > > > 0x18. > > > [...] > > > > What is connected on i2c1 ? Just the camera sensor? or it has some > > other devices there? > > The bma250 accelerometer sits there, and the kernel already has a > driver > for it. That driver needs to have devicetree binding support added, > and > then we should be able to use the accelerometer. bma250 already has devicetree support. It is used in Gemei G9 tablet (sun4i-gemei-g9.dts). Päikest, Priit :) -- 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] Re: [PATCH] ARM: dts: sun4i: Add dts file for the pov protab2-ips9 tablet
On Mon, 2015-09-07 at 10:49 +0200, Hans de Goede wrote: > Hi, > > On 07-09-15 09:49, Priit Laes wrote: > > On Mon, 2015-09-07 at 09:05 +0200, Hans de Goede wrote: > > > Hi, > > > > > > On 06-09-15 18:30, Maxime Ripard wrote: > > > > On Sat, Sep 05, 2015 at 10:21:59AM +0200, Hans de Goede wrote: > > > > > The Point of View protab2-ips9 is a tablet with a 9" ips > > > > > 1024x768 > > > > > lcd screen, > > > > > microsd slot, headphones, mini hdmi, mini usb b and power > > > > > barrel > > > > > connectors. > > > > > > > > > > It uses a rtl8188cus usb wifi chip and a RDA 5875Y bluetooth > > > > > chip > > > > > attached > > > > > to uart2. It has a bma250 accelerometer attached to i2c1 addr > > > > > 0x18. > > > > > > > > > [...] > > > > > > > > What is connected on i2c1 ? Just the camera sensor? or it has > > > > some > > > > other devices there? > > > > > > The bma250 accelerometer sits there, and the kernel already has a > > > driver > > > for it. That driver needs to have devicetree binding support > > > added, > > > and > > > then we should be able to use the accelerometer. > > > > bma250 already has devicetree support. It is used in Gemei G9 > > tablet > > (sun4i-gemei-g9.dts). > > Yes I've seen that, but does it actually work? I've not tried but I > do not see any compatible string in the actual bma250 code in the > kernel, > so I believe that this part of the sun4i-gemei-g9.dts file does not > work ? It worked (even without IRQs) when I submitted the patch. Driver itself is under iio/accel/bma180.c Päikest, Priit -- 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] Re: sun7i_tvd in kernel 3.4
On Saturday, September 5, 2015 at 2:37:12 PM UTC+2, Enrico wrote: > Il giorno mercoledì 2 settembre 2015 19:05:15 UTC+2, xher...@gmail.com ha > scritto:Hi! > > Sorry for upping this very old post... I have a MarsBoard with androind 4.2, > and there is a working demo for the TV input. So I dag into the kernel source > (which is based on the lichee-3.3) and there is the same sun7i_driver. > Identical, except a bunch of registers that are changed ad more init code for > the clocks. I am able to compile it in 3.4 and I can get nice blue frames. > Unfortunately I do not have anymore the cam I used in Android to test it > again, but I hope to have it back soon. > > Did anyone make any progress on this driver? Since in Android the driver > works and there is also a working app (with source), it could be a good > starting point. What do you think? > > Thanks! > > Rodolfo > > > > Hi, can you upload somewhere the files/diff that are different or the whole > sun7i_tvd directory? > > Thanks, > > Enrico Sure! Can I paste diffs here on the list? Thanks, Rodolfo -- 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] Re: sun7i_tvd in kernel 3.4
No idea if works, but someone posted a driver here It is talking about "linein", but it seems to indicate it works... http://www.cubieforums.com/index.php/topic,3890.msg24193/topicseen.html#msg24193 R On Monday, September 7, 2015 at 6:04:07 AM UTC-5, xher...@gmail.com wrote: > > On Saturday, September 5, 2015 at 2:37:12 PM UTC+2, Enrico wrote: > > Il giorno mercoledì 2 settembre 2015 19:05:15 UTC+2, xher...@gmail.com > ha scritto:Hi! > > > > Sorry for upping this very old post... I have a MarsBoard with androind > 4.2, and there is a working demo for the TV input. So I dag into the kernel > source (which is based on the lichee-3.3) and there is the same > sun7i_driver. Identical, except a bunch of registers that are changed ad > more init code for the clocks. I am able to compile it in 3.4 and I can get > nice blue frames. Unfortunately I do not have anymore the cam I used in > Android to test it again, but I hope to have it back soon. > > > > Did anyone make any progress on this driver? Since in Android the driver > works and there is also a working app (with source), it could be a good > starting point. What do you think? > > > > Thanks! > > > > Rodolfo > > > > > > > > Hi, can you upload somewhere the files/diff that are different or the > whole sun7i_tvd directory? > > > > Thanks, > > > > Enrico > > Sure! Can I paste diffs here on the list? > Thanks, > Rodolfo -- 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] Re: [RFC] mmc: core: Set clock before switching to highspeed mode.
Hi On 7 September 2015 at 15:02, Hans de Goedewrote: > Hi, > > > On 06-09-15 16:47, Yousong Zhou wrote: >> >> On Sep 6, 2015 10:14 PM, "Shawn Lin" wrote: >>> >>> >>> 在 2015/9/6 20:09, Yousong Zhou 写道: Hi, On 6 September 2015 at 08:12, Shawn Lin wrote: > > > On 2015/9/5 22:58, Hans de Goede wrote: >> >> >> >> Hi Shawn Lin, >> >> On 05-09-15 16:07, Shawn Lin wrote: >>> >>> >>> >>> On 2015/9/5 18:19, Yousong Zhou wrote: A SD card with sunxi-mmc can fail with the following error message (RCD for response CRC error) when trying to switch to highspeed mode. Setting the bus clock before the access mode switch fixed it. >>> >>> >>> >>> >>> No, that's wrong! >>> >>> Before this card is switched to highspeed, it works under >>> identification mode(From spec: bus clock <= 400KHz). How could you >>> raise bus clock to higher clk rate which I _guess_ is 52MHz before >>> you >>> notify sd cards to run into highspeed mode? >>> >>> Althought it works for this card, this patch will not please the >>> other >>> cards that they might not reply CMDs any longer including the >>> following CMD6. >> >> >> >> >> Thanks for the feedback, this is exactly why I asked Yousong Zhou to >> take this >> to the mmc list. >> >> So if this is not the proper fix for the problem that Yousong Zhou is >> seeing, then >> what might be the proper fix ? >> > > From my knowledge of mmc, there hadn't have a way to deal with this >> >> "broken" > > case. In another word, IMO,it's ANTI-SPEC. We can't be too spec >> >> sometimes, > > but at least we shouldn't violate it. > Maybe the fix is anti-spec. But the fact is that the card works on many other platforms with the builtin card reader (not through an USB adapter), including Mac OS X, my old Nokia Symbian phone, and Windows. >> Could it be that the sunxi-mmc is doing some things in the wrong order >> when >> changing the clock, or is this all under control of the mmc core ? >> > > all of this is under control of the mmc core. > So if Yongsong does want this card to work for any linux-based mmc >> >> stack, I > > guess something like that should be "better"? > > if (switch to HS fail) { > set_bus_clk > goto retry switch to HS > } > > BUT...I admit it seems strange as well. > The SD Specification (simplified version) says "If CRC error occurs on the status data, the host should issue a power cycle.", so I guess the above approach is anti-spec in some way :) >>> >>> Right,I was guessing that way from your intention. >>> >>> In case it may help debug this problem, I'd like to add that the card previously worked fine with U-Boot before commit [1]. This can also be confirmed by Debian Jessie installer image with which the old U-Boot there worked fine while the kernel (3.16) did not. [1] sunxi: mmc: Properly setup mod-clk and clock sampling phases, >> >> http://git.denx.de/?p=u-boot.git;a=commit;h=fc3a832576ce7bb597b1823935bfb7dcca235c3c > > > Interesting, one thing that patch does is introduce a switch from parent pll > when switching from 400KHz to higher clocks. Can you try the attached patch > ? > Previously I tried inserting udelay(1000) immediately after many writel calls: the result were all the same. I just tried that patch adding mdelay(100) after mmc_set_mod_clk(), still no luck, the same error message just as before. > If reverting u-boot commit fc3a832576ce7bb597b1823935bfb7dcca235c3c fixes > things, then it is probably best to focus on fixing u-boot first, and then > we can likely apply the same fix to the kernel. > > With which SoC(s) are you seeing this problem ? I believe that there > may be some differences between the mmc controller used in the A10/13 vs > later SoCs so this may be a SoC specific issue. It's a Cubieboard2 with Allwinner A20. Regards, yousong > > Regards, > > Hans > > > >> OpenWrt ticket 20387 has more info about the U-Boot failure. >> >> https://dev.openwrt.org/ticket/20387 >> >> Anyway, I have no idea what's the effect of those magic numbers on >> "sampling phases". Never played with such things before :) >> >>> I happended to fix some problems which seems *similar* to yours(but I'm >> >> not sure just from commit[1]'s msg): >>> >>> >>> https://patchwork.kernel.org/patch/7119661/ >>> Cheers yousong -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majord...@vger.kernel.org More majordomo info at
[linux-sunxi] Re: sun7i_tvd in kernel 3.4
Il giorno lunedì 7 settembre 2015 13:04:07 UTC+2, xher...@gmail.com ha scritto: > > > Sure! Can I paste diffs here on the list? > Thanks, > Rodolfo i think nobody will complain! Enrico -- 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] Device tree configuration for A20
Hello, I recently switched on mainline kernel and I'm trying to switch from FEX file to device tree system. On FEX I was using, LED configuration, Battery management and power button delay to switch on/off the board (Olimex A20 Lime2). I did not find any ready to use example, I'm digging the web to understand how device tree works and how I can adapt the configuration to my equipment, not an easy task ! It seems the device tree for Allwiner SoC is still in development as I did not find a lot of information on the web. Where could I find some good example to reach my goal ? doest it worth to spend a lot of time trying to use device tree or should I wait a bit longer and stick to FEX file ? Is there any way to use FEX File allong the mainline kernel ? Thank a lot for helping Florian -- 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] Re: [PATCH] ARM: dts: sun4i: Add dts file for the pov protab2-ips9 tablet
Hi, On Mon, Sep 07, 2015 at 11:30:03AM +0200, Hans de Goede wrote: > >>>bma250 already has devicetree support. It is used in Gemei G9 > >>>tablet (sun4i-gemei-g9.dts). > >> > >>Yes I've seen that, but does it actually work? I've not tried but > >>I do not see any compatible string in the actual bma250 code in > >>the kernel, so I believe that this part of the sun4i-gemei-g9.dts > >>file does not work ? > > > >It worked (even without IRQs) when I submitted the patch. Driver > >itself is under iio/accel/bma180.c > > That is really weird, because: > > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/iio/accel/bma180.c > > Does not have an of_match_table ... ?? Not really, when using DT, i2c will set the i2c_client name to the device part of the compatible [1] [2], and then if the of_device_id lookup fails, will fallback to matching the i2c_client name to the i2c_device_id [3]. Which in our case matches. Maxime [1] http://lxr.free-electrons.com/source/drivers/i2c/i2c-core.c#L1281 [2] http://lxr.free-electrons.com/source/drivers/i2c/i2c-core.c#L969 [3] http://lxr.free-electrons.com/source/drivers/i2c/i2c-core.c#L461 -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -- 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. signature.asc Description: Digital signature
Re: [linux-sunxi] Re: [PATCH] ARM: dts: sun4i: Add dts file for the pov protab2-ips9 tablet
On Mon, Sep 07, 2015 at 09:05:29AM +0200, Hans de Goede wrote: > >>+_ldo3 { > >>+ /* > >>+* We need to always power the camera sensor, otherwhise all access > >>+* to i2c1 is blocked. > >>+*/ > >>+ regulator-always-on; > >>+ regulator-min-microvolt = <280>; > >>+ regulator-max-microvolt = <280>; > >>+ regulator-name = "vdd-csi"; > >>+}; > > > >What is connected on i2c1 ? Just the camera sensor? or it has some > >other devices there? > > The bma250 accelerometer sits there, and the kernel already has a driver > for it. That driver needs to have devicetree binding support added, and > then we should be able to use the accelerometer. Ok, so if this regulator is disable, you can't access the other devices as well, right? Do you know why? Is it the regulator providing the pull-up voltage? I'd still like Wolfram's insight on this one. Wolfram, do you have a suggestion and / or a comment on how to deal with such a case? Thanks, Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -- 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. signature.asc Description: Digital signature