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*
xcko has quit [Ping timeout: 258 seconds]
xcko has joined #linux-sunxi
Mangy_Dog has quit [Remote host closed the connection]
jstefanop has joined #linux-sunxi
gnarface has quit [Remote host closed the connection]
jstefanop has quit [Ping timeout: 248 seconds]
lurchi_ is now known as lurchi__
jstefanop has joined #linux-sunxi
xcko has quit [Ping timeout: 245 seconds]
jstefanop has quit [Ping timeout: 272 seconds]
xcko has joined #linux-sunxi
sunshavi has quit [Remote host closed the connection]
sunshavi has joined #linux-sunxi
xcko has quit [Ping timeout: 248 seconds]
xcko has joined #linux-sunxi
jstefanop has joined #linux-sunxi
jstefanop has quit [Ping timeout: 245 seconds]
gnarface has joined #linux-sunxi
cnxsoft has joined #linux-sunxi
nexgen2 has quit [Quit: Leaving]
Da_Coynul has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
megi has quit [Ping timeout: 272 seconds]
nexgen has joined #linux-sunxi
huawei has quit [Quit: ZNC - https://znc.in]
huawei has joined #linux-sunxi
quadjfet has joined #linux-sunxi
quadjfet has quit [Ping timeout: 245 seconds]
quadjfet has joined #linux-sunxi
TheSeven has quit [Disconnected by services]
[7] has joined #linux-sunxi
camus has joined #linux-sunxi
kaspter has quit [Ping timeout: 246 seconds]
camus is now known as kaspter
a|3x has quit [Ping timeout: 272 seconds]
quadjfet has quit [Quit: Leaving]
quadjfet has joined #linux-sunxi
lurchi_ has joined #linux-sunxi
lurchi__ has quit [Ping timeout: 248 seconds]
quadjfet_ has joined #linux-sunxi
quadjfet_ has quit [Client Quit]
quadjfet has quit [Ping timeout: 272 seconds]
NeuroScr has quit [Quit: NeuroScr]
craigo has joined #linux-sunxi
NeuroScr has joined #linux-sunxi
[7] has quit [Ping timeout: 264 seconds]
TheSeven has joined #linux-sunxi
cnxsoft has quit [Ping timeout: 245 seconds]
TheSeven has quit [Ping timeout: 264 seconds]
cnxsoft has joined #linux-sunxi
TheSeven has joined #linux-sunxi
Danct12_ has joined #linux-sunxi
Danct12__ has quit [Ping timeout: 246 seconds]
quadjfet has joined #linux-sunxi
a|3x has joined #linux-sunxi
florian has joined #linux-sunxi
hlauer has joined #linux-sunxi
Danct12_ has quit [Remote host closed the connection]
Danct12_ has joined #linux-sunxi
Danct12_ has quit [Remote host closed the connection]
Danct12_ has joined #linux-sunxi
dtb-confused-guy has joined #linux-sunxi
<dtb-confused-guy> Check.
<dtb-confused-guy> Hi all, I have few questions about DTB file:
<dtb-confused-guy> 1. Can I build new DTB file from existing one, for same arm processor but different board?
<dtb-confused-guy> 2. I tried to convert from .dtb to .dts so I could edit few feature, is that the best practice?
<dtb-confused-guy> I still have a lot of questions, but I need make sure I have right understanding towards dtb file so i wont walk on the wrong track.
<dtb-confused-guy> *I tried to read all of the documentation written in linux-sunxi wiki. And i tried to read many dtb-related topic from google.
<pmp-p> for 1 i'd say you sometimes just have to add "dtb overlays" and maybe have a look to armbian they do that
<dtb-confused-guy> Hi pmp-p, thank you so much for responding. I tried to do that, and still didn't get the device that i want works.
<dtb-confused-guy> From what I learn so far, dtb files are created from patches that provided by the board/processor manufacturer. The put the information about register so "make image/make kernel" process would generate dtb files correctly. Is this correct?
<pmp-p> or they are made from scratch by nice people reading buggy datasheets and clever enough to sort things out ...
<pmp-p> i think there are quite a number of those people here so maybe describe the device
AneoX has joined #linux-sunxi
<dtb-confused-guy> aight, So. For my case, I have Banana Pi P2 Zero. I have datasheet (but I don't know wether it's true or not). I have archlinuxarm running. But I have to copy kernel from ubuntu image generated by nice people in github to make archlinux working. Whenever there's a kernel upgrade, archlinux keep generating the wrong file, so sometimes i lost etherne
<dtb-confused-guy> t, or hdmi.
<dtb-confused-guy> the BSP file support seems like stopped since kernel 3.xxx.
<pmp-p> yes i thinks it is
<dtb-confused-guy> Do you have any recommendation about the documentation so i could learn how to patch it by myself?
<dtb-confused-guy> that document make me understand how device tree blob works.
<pmp-p> i don't know for Arch but for armbian (ubuntu) based distrib original kernel is blacklist, and a private repo is added
<KotCzarny> start from .dts for a similar board/device ?
<dtb-confused-guy> what makes me confuse is, how do they get their dtb correct while the register address is different from datasheet, is that possible? or the datasheet is just not accurate so they discover it by themself and build their own patch file
<KotCzarny> decompiled one is ugly for editing and confusing
<KotCzarny> and it is allwinner's tradition that their documentation is often wrong
<pmp-p> dtb-confused-guy: armbian has a lot of patches indeed
<dtb-confused-guy> Hi KotCzarny, thank you so much for joining! I tried to do that, but isn't it weird my HDMI stop while i only edit for ethernet?
<dtb-confused-guy> You can see my commit here: https://github.com/xqdzn/DTB/commits/master
<dtb-confused-guy> start from .dts for a similar board/device ? >> I did. I even use dtb files for same board, but compiled/written by someone else.
<KotCzarny> for starters, what soc is it?
<KotCzarny> and what device
<dtb-confused-guy> Allwinner H2+. Banana Pi P2 Zero.
<KotCzarny> p2?
<pmp-p> ho no another one :p
<KotCzarny> oh, good ol' banana folks
<dtb-confused-guy> lmao
<KotCzarny> yes, their datasheets are created by copy/pasting
<dtb-confused-guy> seems like too much banana-confused-guy came here
<KotCzarny> use whatever information for h2+/h3 you find on linux-sunxi.org wiki
<KotCzarny> safer
<dtb-confused-guy> is it safe if i use wrong register in dtb file? can i burn / broke some device inside the board if i get the register wrong?
<KotCzarny> unlikely
<dtb-confused-guy> so it's safe to do experiment about dtb file? i can't break the board. I just might lose the functionality of the device, right?
<KotCzarny> yup
<KotCzarny> and power cycle will revert to factory state
<dtb-confused-guy> Maaan, i love this channel so much. Been asking of this for weeks, no one seems interested.
<dtb-confused-guy> *asked in board forum, and distro forum.
<dtb-confused-guy> So in another word, linux need to be directed to the device: which pin is ethernet, which one is a, which one is b. And DTB files responsible to tell linux where is it. Is this correct?
<KotCzarny> more like its in soc definition, and board specific dts enables/configures subdevices
<EmilKarlson> isn't that the pincontrol thing
<dtb-confused-guy> Aight, the parameter is from linux, and the value is from the board manufacturer, right?
<KotCzarny> btw. you might add a device to the wiki http://linux-sunxi.org/New_Device_howto http://linux-sunxi.org/New_Device_page
<KotCzarny> both as a shortcut for your findings and helping others
<dtb-confused-guy> I will, gladly. So someone else wont lose their time like mine.
<dtb-confused-guy> But i need to make sure about what i write is correct first. So i wont lead someone else to the wrong track.
<KotCzarny> and you can use this table http://linux-sunxi.org/Table_of_allwinner_based_boards to find some device similar to yours
<KotCzarny> most often its about ethernet/emmc/wifi existing on your board
<KotCzarny> and vreg/pmu
<KotCzarny> once you create a working dts you might also post to linux-sunxi mailing list to include it in mainline kernel/uboot too
<dtb-confused-guy> Sure.
<dtb-confused-guy> Can you please look at this: https://www.diffchecker.com/Wn9hr9f6
<dtb-confused-guy> Left one is from ubuntu working dtb files. Right one is from archlinux, i did nothing but change disabled to okay.
quadjfet has quit [Quit: Leaving]
<dtb-confused-guy> Can i say: Phandle is different because the dtb file has their own node numbering system. And apparently, all of them is correct. << Is this correct?
kaspter has quit [Read error: Connection reset by peer]
<KotCzarny> phandle is defined elsewhere in the dts
<KotCzarny> its just a list of things you add
<KotCzarny> so might differ from dtb to dtb
kaspter has joined #linux-sunxi
<dtb-confused-guy> aight nice. And the "reg = <0x1c30000 0x10000>;" is register, we get it from the board/processor manufacturer's datasheet, or by guessing. << Is this right?
<KotCzarny> regs are shared for a soc family
<KotCzarny> and defined in allwinner-h3-h5.dtsi etc
<KotCzarny> in device dts you just enable/add whatever else is on board
<KotCzarny> you should check some other device with 100mbit eth
<dtb-confused-guy> whoaaa, this is getting interesting and enlightening. For development, I could just edit dtb - dts file back and forth, once it's stable and correct, I can make patch file to contribute << Is this correct?
<KotCzarny> well, you should start from some source dts
<KotCzarny> decompiled one is ugly and confusing
<dtb-confused-guy> where can i get it? linux source?
<KotCzarny> yup
<KotCzarny> i assume you use mainline ?
<KotCzarny> or stick to some old 4.4?
<dtb-confused-guy> mainline
<dtb-confused-guy> So i should read the file carefully, from Processor "allwinner-h3-h5.dtsi" > board.dtsi / or similar board.dtsi. Once all set, i can compile it to get dtb file << is this correcT?
<KotCzarny> yes
tllim has quit [Ping timeout: 264 seconds]
<KotCzarny> board.dts include allwinner-h3 or h3-h5 .dtsi and just enable/add what needed
<KotCzarny> and sometimes include some other dtsi if there are few boards that share something more
<KotCzarny> and h2+ is just h3, so treat them the same
<dtb-confused-guy> And as long as there are no right patch submitted to the mainline, it'll still wont work. And we have to compile the kernel manually everytime there's a kernel upgrade, << is this correct?
<KotCzarny> no
<KotCzarny> just dts/dtb
<KotCzarny> no need to compile kernel
<KotCzarny> ie. make dtbs is enough
<dtb-confused-guy> okay, here's the step: get mainline kernel > uncompress > change necessary parameter > make dtb > use the generated dtb to boot. << is this correct?
<KotCzarny> yup
<dtb-confused-guy> Will 5.3-rc4 version dtb files run in (let's say) 5.3-rc5 ?
<KotCzarny> yup
<KotCzarny> and most likely even on 4.x
<dtb-confused-guy> then we only need to get dtb files correct once. No need to do more research about it since the regs wont be changed.
<KotCzarny> sometimes device shorthands differ, but they are usually stable
<KotCzarny> regs dont change because soc doesnt change
<KotCzarny> for particular soc, that is
<KotCzarny> gpios might change from board to board tho
<KotCzarny> because its up to manufacturer to decide what is dangling from the particular pin
<dtb-confused-guy> Will there any parameter change from linux ? so we have to reconfigure it? like https://www.diffchecker.com/Wn9hr9f6
<dtb-confused-guy> Left one has "phy-mode = "mii";" but the right one has none.
<KotCzarny> there are 2 eth modes on boards
<KotCzarny> internal and external phy
<KotCzarny> in short, most gigabit share same config, same for 100mbit
<dtb-confused-guy> where can i learn that? like what is "phy-mode" in "ethernet" node
<KotCzarny> just look on other board files
<KotCzarny> and compare with the table i've pasted earlier to see what is on them
<dtb-confused-guy> so there are no official documentation about what is it? like what is "interrupts" and what value should we put in it.
<KotCzarny> check linux-sunxi.org wiki
<KotCzarny> it has a LOT of info
<KotCzarny> including schematics, howtos etc
<dtb-confused-guy> Aight man. Thank you so much!
<dtb-confused-guy> never been this far before.
<KotCzarny> also, remember that sometimes it's uboot that initializes/powers up things
<KotCzarny> so you might create config in uboot too
<KotCzarny> but since you have a working one you can stick to kernel so far
<dtb-confused-guy> sure, i'll check it as well.
Mangy_Dog has joined #linux-sunxi
<dtb-confused-guy> So, for the problem about: my os keep generating new dtb file whenever there's a kernel upgrade, i should consult to the appropriate distro forum, right?
<KotCzarny> yup
<KotCzarny> but if you send a patch to mainline kernel, boom, you have your board supported
<KotCzarny> :)
<dtb-confused-guy> aight, i guess, in order to do that, i should prepare patch file so the board will be supported
<dtb-confused-guy> nice, that's what i thought, so others wont waste their time confusing around. Maaaaaan i love this open source spirit.
<dtb-confused-guy> Thank you so much!
<KotCzarny> work on sunxi boards is done in linux-sunxi, so you might send a patch there
<KotCzarny> which will then get pushed to mainline, maybe
<KotCzarny> but im not sure, not a kernel dev
<KotCzarny> :)
<dtb-confused-guy> I'll consult here once i got it working manually. I never done that "submitting patches" thing before.
<diego71> dtb-confused-guy: probably you can find useful this, to consult the kernel sources: https://elixir.bootlin.com/linux/latest/source
<dtb-confused-guy> Whoa, that's so convenient.
<diego71> indeed :)
<jernej> KotCzarny: dtb-confused-guy: All patches for mainline kernel must be submitted to at least all e-mails provided by scripts/get_maintainer.pl script found in Linux source
<jernej> linux-sunxi ML is not one of them
<jernej> but it's nice to include it
<dtb-confused-guy> guys, how's about defconfig? once it made and works, we dont have to change it for another version of kernel, right?
<KotCzarny> nope
<KotCzarny> and you use sunxi_defconfig for all sunxi boards
<KotCzarny> the actual device config is in dts
megi has joined #linux-sunxi
<diego71> dtb-confused-guy: usually you are not supposed to modify the defconfig. The actual configuration is saved in .config
<diego71> "make defconfig" or "make sunxi_defconfig" just overwrite it
<aalm> dtb-confused-guy, i was reading the backlog, and thought i should mention this path to you: Documentation/devicetree/bindings/
dtb-confused-guy has quit [Remote host closed the connection]
JohnDoe_71Rus has joined #linux-sunxi
<KotCzarny> and that bpi-p2 zero has real poe
<KotCzarny> as addon board, but.
dtp-confused-guy has joined #linux-sunxi
nexgen has quit [Quit: Leaving]
<KotCzarny> dtp-confused-guy: from that banana page: BPI-P2 Zero, just 3 change on BPI-M2 Zero
<KotCzarny> so start with bpi-m2 zero dts
<KotCzarny> enable emmc and internal phy (100mbit)
<KotCzarny> and you should be done
<dtp-confused-guy> check.
<dtp-confused-guy> Aight, i just reboot my pc and forgot how to login xD it's been a while since last time i use IRC
<dtp-confused-guy> https://freenode.irclog.whitequark.org/linux-sunxi/2019-08-16 i checked our last convo here, thank you guys. I'm trying.
NeuroScr has quit [Quit: NeuroScr]
gaston_ has joined #linux-sunxi
Da_Coynul has joined #linux-sunxi
Da_Coynul has quit [Client Quit]
Da_Coynul has joined #linux-sunxi
kaspter has quit [Quit: kaspter]
Da_Coynul has quit [Client Quit]
kaspter has joined #linux-sunxi
Da_Coynul has joined #linux-sunxi
kaspter has quit [Read error: Connection reset by peer]
msevo has joined #linux-sunxi
Da_Coynul has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
Da_Coynul has joined #linux-sunxi
sunilmohan has quit [Ping timeout: 258 seconds]
sunilmohan has joined #linux-sunxi
sunilmohan has quit [Changing host]
sunilmohan has joined #linux-sunxi
kaspter has joined #linux-sunxi
nexgen has joined #linux-sunxi
SopaXorzTaker has joined #linux-sunxi
<montjoie> wens: MoeIcenowy: could you give me your opinion on the pine64 dts modelA vs modelB thread ?
nexgen has quit [Quit: Leaving]
afaerber has joined #linux-sunxi
msevo has quit [Quit: Leaving]
pgreco has quit [Ping timeout: 272 seconds]
pgreco has joined #linux-sunxi
pgreco has quit [Ping timeout: 258 seconds]
hlauer has quit [Read error: Connection reset by peer]
pgreco has joined #linux-sunxi
pmp-p has quit [Ping timeout: 245 seconds]
pmpp has joined #linux-sunxi
jelly has quit [Read error: Connection reset by peer]
jelly-home has joined #linux-sunxi
kaspter has quit [Read error: Connection reset by peer]
kaspter has joined #linux-sunxi
<wens> montjoie: I think we've already crossed the line for having the already merged dts as the modelB one
<wens> montjoie: since the ethernet parts are incompatible, and are already merged
<montjoie> wens: this is what I think
<montjoie> could you ack my point of view ? I will send a subsequent patch for changing "model =" in the dts by appending modelB
<KotCzarny> models should be called revisions, i guess
<KotCzarny> dont mind me, just passing by
<wens> KotCzarny: the board form factor is completely different. I wouldn't call it a revision :p
<wens> montjoie: I think MoeIcenowy needs to chime in as I can't find the relevant context on the development of the original h64 emac patch series
dddddd has joined #linux-sunxi
pmpp is now known as pmp-p
cnxsoft has quit [Quit: cnxsoft]
jelly-home is now known as jelly
pgreco has quit [Ping timeout: 246 seconds]
nexgen has joined #linux-sunxi
pgreco has joined #linux-sunxi
tllim has joined #linux-sunxi
aalm has quit [Quit: xyz 2.3]
lurchi_ is now known as lurchi__
lurchi__ has quit [Ping timeout: 245 seconds]
tllim has quit [Quit: Leaving]
perr_ has joined #linux-sunxi
perr_ is now known as perr
megi has quit [Ping timeout: 246 seconds]
perr_ has joined #linux-sunxi
perr has quit [Read error: Connection reset by peer]
perr_ has quit [Remote host closed the connection]
vagrantc has joined #linux-sunxi
lurchi__ has joined #linux-sunxi
lurchi__ has quit [Ping timeout: 264 seconds]
florian has quit [Ping timeout: 246 seconds]
Alexis3D has joined #linux-sunxi
megi has joined #linux-sunxi
quadjfet has joined #linux-sunxi
<Alexis3D> I've a Pine H64 model B, and I'm trying to get it to work properly with the sunxi-next kernel source. So far I've managed to get something bootable, but the sun4i DRM driver seems to hang the kernel if I enable it when using the sunxi_defconfig. Here's the trace: https://pastebin.com/hPnpH2K2
<Alexis3D> Any ideas to fix it?
Mangy_Dog has quit [Ping timeout: 245 seconds]
Mangy_Dog has joined #linux-sunxi
Mangy_Dog has quit [Ping timeout: 272 seconds]
Mangy_Dog has joined #linux-sunxi
<Alexis3D> Moreover, I can't use eMMC, and the kernel shows I/O errors: https://pastebin.com/Tk9ZQGe5
<jernej> Alexis3D: did you set more than 16 MiB of CMA (default)? 64 MiB should work fine, increase to 128 MiB if you plan to use 4K display with double buffering
<Alexis3D> Nope, I didn't
<Alexis3D> I'll try that out and tell you, thanks :D
lurchi__ has joined #linux-sunxi
<Alexis3D> I've just set CONFIG_CMA_SIZE_MBYTES to 16. I'm rebuilding the kernel
<Alexis3D> *64
kaspter has quit [Read error: Connection reset by peer]
<Alexis3D> It didn't do the trick, jernej
kaspter has joined #linux-sunxi
<jernej> well, it certainly part of the problem
<jernej> can you show your kernel config?
<Alexis3D> The trace is the same: https://pastebin.com/zUnAWT03
<Alexis3D> Yup
<Alexis3D> Here it is: https://pastebin.com/dNN7L1p8
<Alexis3D> I've switched to 5.3-rc4 to see if the cause was some recent change in sunxi-next, but the same thing happens
<jernej> Alexis3D: CONFIG_DRM_SUN8I_DW_HDMI and CONFIG_DRM_SUN8I_MIXER must be "y"
<Alexis3D> Alright
<Alexis3D> Rebuilding with those changes :)
dtp-confused-guy has quit [Remote host closed the connection]
<Alexis3D> Now it works, thanks!
<Alexis3D> May I ask why was it necessary to select CONFIG_DRM_SUN8I_MIXER, when its description says that is for DE 2.0 devices, while I think my SoC has a DE 3.0?
<jernej> DE3 is just updated DE2
<jernej> and at the time when driver was written, DE3 didn't exist yet
<Alexis3D> Thanks. Maybe I send a patch updating the description of that Kconfig option then :P
skiboy has joined #linux-sunxi
skiboy has quit [Client Quit]
JohnDoe_71Rus has quit [Quit: KVIrc KVIrc Aria 5.0.0, revision: 5.0.0+git-7422-2fe1a3bca, build type: debug, sources date: 20160102, built on: 2019-07-01 08:27:19 UTC 5.0.0+git-7422-2fe1a3bca http://www.kvirc.net/]
AneoX has quit [Quit: Textual IRC Client: www.textualapp.com]
SopaXorzTaker has quit [Quit: Leaving]
florian has joined #linux-sunxi
NeuroScr has joined #linux-sunxi
Alexis3D has quit [Remote host closed the connection]
lurchi__ has quit [Ping timeout: 252 seconds]
lurchi__ has joined #linux-sunxi
florian has quit [Ping timeout: 268 seconds]
lurchi__ has quit [Ping timeout: 246 seconds]
gaston_ has quit [Quit: Konversation terminated!]
lurchi__ has joined #linux-sunxi
GrimKriegor has quit [Ping timeout: 246 seconds]
GrimKriegor has joined #linux-sunxi
GrimKriegor has joined #linux-sunxi
tllim has joined #linux-sunxi
Mangy_Dog has quit [Ping timeout: 245 seconds]
Da_Coynul has joined #linux-sunxi
vagrantc has quit [Quit: leaving]
tllim has quit [Read error: Connection reset by peer]