rellla changed the topic of #linux-sunxi to: Allwinner/sunxi /development discussion - did you try looking at our wiki? https://linux-sunxi.org - Don't ask to ask. Just ask and wait! - https://github.com/linux-sunxi/ - Logs at http://irclog.whitequark.org/linux-sunxi - *only registered users can talk*
vagrantc has quit [Quit: leaving]
gaston1980 has quit [Quit: Konversation terminated!]
jstefanop has joined #linux-sunxi
jstefanop has quit [Ping timeout: 258 seconds]
souther has quit [Ping timeout: 245 seconds]
souther has joined #linux-sunxi
cnxsoft has joined #linux-sunxi
lurchi__ is now known as lurchi_
cnxsoft has quit [Quit: cnxsoft]
dddddd has quit [Remote host closed the connection]
kaspter has quit [Quit: kaspter]
lurchi_ is now known as lurchi__
TheSeven has quit [Ping timeout: 245 seconds]
[7] has joined #linux-sunxi
megi has quit [Ping timeout: 265 seconds]
jstefanop has joined #linux-sunxi
jstefanop has quit [Ping timeout: 265 seconds]
airwind has joined #linux-sunxi
lurchi_ has joined #linux-sunxi
lurchi__ has quit [Ping timeout: 268 seconds]
montjoie has quit [Quit: Lost terminal]
montjoie has joined #linux-sunxi
Gerwin_J has joined #linux-sunxi
[7] has quit [Ping timeout: 245 seconds]
arete74 has quit [Ping timeout: 240 seconds]
arete74 has joined #linux-sunxi
florian has joined #linux-sunxi
TheSeven has joined #linux-sunxi
quadjfet has quit [Quit: Leaving]
tdebrouw has joined #linux-sunxi
arete74 has quit [Ping timeout: 268 seconds]
arete74 has joined #linux-sunxi
tnovotny has joined #linux-sunxi
ldevulder_ is now known as ldevulder
yann has quit [Ping timeout: 265 seconds]
florian has quit [Ping timeout: 245 seconds]
<tdebrouw> Hi.
<tdebrouw> I'm trying to use the emac (100MBit) interface on the V40. It should compatible with sun4i-emac.
<tdebrouw> I added the necessary nodes in my device tree & added sun4i-emac / mdio-sun4i to my config.
<tdebrouw> It isn't working yet. But I noticed that the mdio-sun4i gets loaded before the sun4i-emac.
<tdebrouw> The silicon uses the same clk, which is enabled by the sun4i-emac.
<tdebrouw> What would be the best way to load sun4i-emac before mdio-sun4i is loaded?
<tdebrouw> I assume this clk is often started in uboot (for other socs with sun4i-emac interfaces)
<tdebrouw> But I don't need it in uboot, hence, it isn't configured there.
<montjoie> tdebrouw: are you sure that V40 use sun4i-emac ?
<montjoie> since it is a modified R40, probably it uses the sun8i-emac
<tdebrouw> there are 2 interfaces
<tdebrouw> 1 GMAC -> using sun8i-emac
<wens> tbueno: fix mdio-sun4i driver
<tdebrouw> 1 EMAC -> using sun4i-emac
<wens> tdebrouw: fix the mdio-sun4i driver by having it enable the clocks as well
<tdebrouw> wens: ok
<tdebrouw> thanks
yann has joined #linux-sunxi
jernej has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
jernej has joined #linux-sunxi
florian has joined #linux-sunxi
cnxsoft has joined #linux-sunxi
tllim has quit [Read error: Connection reset by peer]
cnxsoft1 has joined #linux-sunxi
cnxsoft has quit [Ping timeout: 265 seconds]
kaspter has joined #linux-sunxi
<tdebrouw> wens: it's not possible to simply add the clocks (I tried)
<tdebrouw> since sun4i-emac is enabling the mii core
<tdebrouw> and setting it's clock
<tdebrouw> or I'm missing something (also possible)
<wens> I don't see it setting clock rates? only enabling/disabling
<wens> oh, the MII clock
<tdebrouw> yeah
<tdebrouw> and that one is on offset 7C -> outside of the reg range
<wens> oh wow, this is structured badly
<tdebrouw> of the mdio
<tdebrouw> I'm glad I'm not the only one thinking that
<wens> I guess the proper fix would be to merge the two devices, or fix the register range. both are problematic
<tdebrouw> merging makes more sense, IHMO
<tdebrouw> but I'm not really active here
<tdebrouw> so I'll let someone else decide ;)
<tdebrouw> I'm willing to put in some effort though
<tdebrouw> also, it seems like this change might have a lot of impact on several other devices
<tdebrouw> but I only have a V40
megi has joined #linux-sunxi
<montjoie> send a patch for review as RFC/RFT
AneoX has joined #linux-sunxi
kaspter has quit [Quit: kaspter]
cristian_c has quit [Ping timeout: 258 seconds]
Mangy_Dog has joined #linux-sunxi
<KotCzarny> montjoie: ^
<KotCzarny> oh, you have already answered
<KotCzarny> i need glasses
gaston1980 has joined #linux-sunxi
dddddd has joined #linux-sunxi
ganbold has quit [Ping timeout: 265 seconds]
ganbold has joined #linux-sunxi
ganbold has quit [Ping timeout: 265 seconds]
airwind has quit [Quit: airwind]
ganbold has joined #linux-sunxi
tnovotny has quit [Quit: Leaving]
gsz has joined #linux-sunxi
lurchi_ is now known as lurchi__
tdebrouw has quit [Quit: Leaving.]
aloo_shu has quit [Ping timeout: 245 seconds]
pg12_ has joined #linux-sunxi
pg12 has quit [Ping timeout: 250 seconds]
Gerwin_J has quit [Ping timeout: 264 seconds]
Gerwin_J has joined #linux-sunxi
aloo_shu has joined #linux-sunxi
diego71 has quit [Ping timeout: 245 seconds]
diego71 has joined #linux-sunxi
tuxillo has quit [Ping timeout: 268 seconds]
JohnDoe_71Rus has joined #linux-sunxi
JohnDoe_71Rus has quit [Changing host]
JohnDoe_71Rus has joined #linux-sunxi
tuxillo has joined #linux-sunxi
Perlovka_ has joined #linux-sunxi
Perlovka has quit [Ping timeout: 240 seconds]
jstefanop has joined #linux-sunxi
netlynx has joined #linux-sunxi
night199uk has quit [Ping timeout: 276 seconds]
megi has quit [Ping timeout: 245 seconds]
tllim has joined #linux-sunxi
return0e_ has joined #linux-sunxi
return0e has quit [Ping timeout: 265 seconds]
florian has quit [Quit: Leaving]
return0e has joined #linux-sunxi
return0e_ has quit [Ping timeout: 276 seconds]
<anarsoul> jernej: does DE2 support rotation?
lkcl has quit [Ping timeout: 240 seconds]
megi has joined #linux-sunxi
ganbold has quit [Remote host closed the connection]
yann has quit [Ping timeout: 240 seconds]
reinforce has joined #linux-sunxi
night199uk has joined #linux-sunxi
reinforce has quit [Quit: Leaving.]
reinforce has joined #linux-sunxi
<jernej> anarsoul: yes, but it is separate core, present mostly on A-series SoCs AFAIK
<jernej> it's not part of display pipeline, so you have to set input and output buffer
<jernej> so it's more appropriate to implement it as V4L2 M2M driver
<jernej> which was designed for exactly such cases
florian has joined #linux-sunxi
gaston1980 has quit [Quit: Konversation terminated!]
wasutton3 has joined #linux-sunxi
<wasutton3> is there a repo for RSB tools to interact with an AXP PMIC? I'm seeing references directly in the kernel, but no utilities.
yann has joined #linux-sunxi
<mru> what do you want to do?
<KotCzarny> probably create a bomb
<mru> "they've set the pmic to overload! run!"
<anarsoul> jernej: it would be hard to wire it into x11/wayland if it's v4l2 m2m driver
<wasutton3> lol, no i'd like to be able to toggle one of the regulators off and back on after reflashing a few devices attached to that regulator
<KotCzarny> wouldnt it affect whole soc?
<mru> does poking something under /sys/class/regulator not work?
<mru> KotCzarny: depends on which regulator
<wasutton3> correct
<wasutton3> DLDO4 would be my ideal choice. (A64+AXP803)
florian has quit [Ping timeout: 265 seconds]
<jernej> anarsoul: BSP rotation driver is also totally separate (https://github.com/longsleep/linux-pine64/tree/pine64-hacks-1.2/drivers/char/sunxi_tr), but they still use it in X11, so it's possible
<anarsoul> how do they use it in X11?
<jernej> let me try find exact code
<megi> wasutton3: you may try enabling regmap writing in debugfs and poke the AXP registers directly there
<anarsoul> jernej: I guess it's possible with a separate driver
<megi> you can export buffers from v4l2 and import them to drm, at least that's what I do in my camera app. rotation driver would be nice.
<anarsoul> megi: yet I'm not sure that you can do that in X11 or any wayland compositor without writing any code
<megi> I have some in-progress code for rotation driver for v4l2 m2m, for A83T, but I sort of lost interest when I realized the HW probably can't take YUYV or RGB565
<megi> as input
<megi> I don't know, I don't use either
<megi> I write code :)
<jernej> anarsoul: I think they modified armsoc a bit, but currently I don't know where I saw that (it was long time ago)
<jernej> and I can't find it
<wasutton3> megi, im not sure how to enable regmap. im running anarsoul's arch image fwiw
<anarsoul> I see
<megi> it's some hidden kernel option
<megi> you need to re-compile
<wasutton3> dang.
<anarsoul> megi: thanks for cursors patches btw, they work fine on pinebook
<megi> regmap debugfs is probably enabled by default, but that's read-only
<megi> there's special option to allow for r/w access
<megi> or maybe it just ended as a patch on mailing list, I don't remember
<wasutton3> megi, i guess the next question would be where to poke
<megi> it's dangerous
<wasutton3> im very aware that it is
<megi> AXP datasheet :)
<wasutton3> well i mean in terms of which bus to poke through
<jernej> but yes, juggling buffers between DRM and V4L2 is very common, for example Kodi does that for zero-copy playback
<megi> in debugfs you'll see registers file for AXP
<megi> you'll just write to that file
<wasutton3> yep, i see it now
cristian_c has joined #linux-sunxi
<wasutton3> 0x00-0xed
<megi> yes
quadjfet has joined #linux-sunxi
<megi> it's REGMAP_ALLOW_WRITE_DEBUGFS option btw
<megi> seems like it expects two values, address and a new register value
<wasutton3> that sounds about right
<wasutton3> almost like an assembly instruction
<megi> both in hex
<wasutton3> as expected
<megi> ahh, you have to enable it in code
<megi> nice
<megi> #undef -> #define :)
florian has joined #linux-sunxi
Gerwin_J has quit [Quit: Gerwin_J]
quadjfet has quit [Quit: Leaving]
<wasutton3> ok, so it looks like 0x12 is set to 0x89, which means DLDO4 is set to off, but a default value of 3.3V when turned on.
<wasutton3> my multimeter agrees
<wasutton3> therefore, i need to set 0x12 to 0xC9 to turn bit 6 from 0 -> 1
<wasutton3> so it looks like the folder also has an access file, with the register values followed by "y y n n" or some combination.
<wasutton3> so it looks like i need to write something in C to use the debugfs api
<megi> why?
<megi> echo -n 'ab cd' > registers
<wasutton3> oooh that works too
<megi> it better should :)
<wasutton3> if registers has stuff in it already, won't that overwrite everything?
<megi> nope
<megi> it's handled by that function I linked above
<wasutton3> ok
<megi> it will just do a single register write
<wasutton3> hmmm bash: echo: write error: Invalid argument
<megi> did you recompile the kernel?
<wasutton3> ah, that would be why
<wasutton3> change undef to def
<megi> define
<anarsoul> wouldn't it be easier to add a regulator to dts?
<megi> anarsoul: you can't control that from userspace, no?
<anarsoul> and let axp803 driver deal with it
<wasutton3> anarsoul, possibly, but then how would it be toggled? does DTS present that interface?
<anarsoul> dts is device tree
<anarsoul> it's a file
<wasutton3> anarsoul, right, and isn't it loaded at boot time?
<anarsoul> megi: I guess it's possible to wire it up to rfkill if all you need is toggling it
<megi> wasutton3: anyway, expect that if you change registers behind the kernel driver's back, you may run into some fun results ;)
<megi> anarsoul: interesting, that would be cleaner
<wasutton3> agreed, i like that rather than having to recompile a kernel
<anarsoul> you still need to change your dts and compile it :)
<anarsoul> (it == dts)
<wasutton3> that i've done before
<wasutton3> but wiring it into rfkill is soemthing new
<wasutton3> i see the 'regulator-always-on;' flag, im wondering if there is a 'regulator-switchable;' or somethign simialr
<megi> you'd probably need to add node for rfkill and for the regulator, and link rfkill to the regulator. rfkill has userspace interface you can then use to control the regulator
<megi> you can probably find some examples in other dts files
<megi> if you grep a bit :)
<wasutton3> yup, thats what im doing now
<megi> there's also docs in dt-bindings folder in kernel sources
<megi> with examples
<megi> well, maybe not :)
<wasutton3> i was gonna say
<megi> :D
<wasutton3> great success there
<megi> there's regulator/userspace-consumer.c that offers interface to enable/disable regulator from userspace via sysfs
<megi> but you're out of luck, as it can't be instantiated from DTS
Nakaori has quit [Remote host closed the connection]
return0e has quit [Read error: Connection reset by peer]
Nakaori has joined #linux-sunxi
return0e has joined #linux-sunxi
ElBarto has quit [Read error: Connection reset by peer]
ElBarto has joined #linux-sunxi
jstefanop has quit [Remote host closed the connection]
jstefanop has joined #linux-sunxi
jstefanop has quit [Ping timeout: 268 seconds]
gsz has quit [Quit: Konversation terminated!]
tllim has quit [Read error: Connection reset by peer]
jstefanop has joined #linux-sunxi
jstefanop has quit [Ping timeout: 265 seconds]
lurchi__ is now known as lurchi_
jstefanop has joined #linux-sunxi
ed_peguillan_ has joined #linux-sunxi
ed_peguillan has quit [Disconnected by services]
ed_peguillan_ is now known as ed_peguillan
netlynx has quit [Quit: Ex-Chat]
ed_peguillan has quit [Ping timeout: 258 seconds]
ed_peguillan has joined #linux-sunxi
JohnDoe_71Rus has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
jstefanop has quit [Remote host closed the connection]
jstefanop has joined #linux-sunxi
jstefano_ has joined #linux-sunxi
lurchi_ is now known as lurchi__
jstefanop has quit [Ping timeout: 276 seconds]
jstefano_ has quit [Ping timeout: 265 seconds]
lurchi__ is now known as lurchi_
ldevulder_ has joined #linux-sunxi
ldevulder has quit [Ping timeout: 246 seconds]
gnufan_home has joined #linux-sunxi
AneoX has quit [Quit: Textual IRC Client: www.textualapp.com]
quadjfet has joined #linux-sunxi
reinforce has quit [Quit: Leaving.]
jelly has quit [Ping timeout: 268 seconds]
anarsoul|c has quit [Quit: Connection closed for inactivity]
jelly-home has joined #linux-sunxi
gaston1980 has joined #linux-sunxi
florian has quit [Ping timeout: 240 seconds]
gaston1980 has quit [Quit: Konversation terminated!]
gnufan_home has quit [Quit: Leaving.]
ed_peguillan has quit [Read error: Connection reset by peer]
tllim has joined #linux-sunxi
lurchi_ is now known as lurchi__
lurchi__ is now known as lurchi_
Mangy_Dog has quit [Ping timeout: 240 seconds]