narmstrong changed the topic of #linux-amlogic to: Amlogic mainline kernel development discussion - our wiki http://linux-meson.com/ - ml linux-amlogic@lists.infradead.org - official channel moved from Freenode - publicly logged on https://libera.irclog.whitequark.org/linux-amlogic
jacobk has joined #linux-amlogic
montjoie has quit [Ping timeout: 245 seconds]
montjoie has joined #linux-amlogic
vagrantc has quit [Quit: leaving]
jacobk has quit [Ping timeout: 248 seconds]
jacobk has joined #linux-amlogic
hexdump0815 has quit [Ping timeout: 248 seconds]
hexdump0815 has joined #linux-amlogic
camus1 has joined #linux-amlogic
camus has quit [Ping timeout: 246 seconds]
camus1 is now known as camus
chewitt has joined #linux-amlogic
chewitt has quit [Quit: Zzz..]
chewitt has joined #linux-amlogic
luka177 has quit [Ping timeout: 256 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 260 seconds]
luka177 has joined #linux-amlogic
rpardini has joined #linux-amlogic
chewitt has quit [Quit: Zzz..]
chewitt has joined #linux-amlogic
ldevulder has joined #linux-amlogic
JohnnyonFlame has quit [Read error: Connection reset by peer]
luka177 has quit [Ping timeout: 245 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 246 seconds]
luka177 has joined #linux-amlogic
rpardini has quit [Quit: ZZZzzz…]
jkl has quit [Quit: Gone.]
ldevulder has quit [Ping timeout: 244 seconds]
jkl has joined #linux-amlogic
luka177 has quit [Ping timeout: 260 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 248 seconds]
luka177 has joined #linux-amlogic
rpardini has joined #linux-amlogic
tolszak has joined #linux-amlogic
rpardini has quit [Quit: ZZZzzz…]
rpardini has joined #linux-amlogic
luka177 has quit [Read error: Connection reset by peer]
luka177 has joined #linux-amlogic
rpardini has quit [Read error: Connection reset by peer]
rpardini has joined #linux-amlogic
<tolszak> narmstrong: Hello, Any idea why on odroid c4 there is no default i2c-0 bus, instead i2c-0 is "DesignWare HDMI I2C bus", on odroid c2 the HDMI i2c bus is i2c-1 and i2c-0 is default i2c bus for gpio pins.
<narmstrong> tolszak: on the c4 there’s no i2c bus on the board, so the hdmi ddc bus takes the number 0
<tolszak> pin 3 and 5, pin 27 and 28?
f_ has joined #linux-amlogic
jkl has quit [*.net *.split]
kenny has quit [*.net *.split]
anessen97 has quit [*.net *.split]
Lyude has quit [*.net *.split]
jkl has joined #linux-amlogic
Lyude has joined #linux-amlogic
anessen97 has joined #linux-amlogic
kenny has joined #linux-amlogic
<tolszak> narmstrong: I mean is there a way to enable it like on C2?
<tolszak> Should I look how to patch device tree?
<narmstrong> tolszak: those are the header pins they are not necessarely i2c busses
<tolszak> I understand but by default hardkernel ubuntu loads overlays for i2c-0
<narmstrong> hardkernel doesn't provide overlays for upstream kernel
<tolszak> I understand that. So is there a way to use gpio as i2c in such case?
<tolszak> I've never done it on yocto
<f_> Does HardKernel even care about mainline?
<f_> (curious)
<tolszak> f_: I don't think so :-)
<f_> ¯\_(ツ)_/¯
<f_> Really, sad to see that so few SBC vendors care about upstream, despite the benefits it can provide.
ldevulder has joined #linux-amlogic
<f_> Even Amlogic started to somehow care a little bit about mainline....at least as far as I can tell they started sending patches.
<f_> (doesn't imply they care about open-source/libre though)
<f_> (in fact, in the firmware-side, it's quite the opposite really)
<tolszak> f_: I'm a bit noob, hence bothering ppl here. And wondering is there a way to patch the kernel and use gpio as i2c in such case?
<tolszak> I'm using odroids with yocto successfuly for some time now, thanks to meta-meson. And usually every issue was solvable. Last bigger issue I had was with enabling microusb as host device on Odroid c2. But someone here guided me how to patch it.
<f_> I have very little experience with HardKernel boards...so..
<f_> I only really have an old set-top box and 2 Libre Computer boards
<f_> sorry..
<f_> But maybe others more familiar with their boards can chime in here :)
naoki has joined #linux-amlogic
<chewitt> HK make decent-enough boards and provide a good level of software/support to their customers
<chewitt> they primarily focus on the bsp codebase
luka177 has quit [Ping timeout: 246 seconds]
luka177 has joined #linux-amlogic
<chewitt> although the overall level of support for the newer generation SoCs they're using is such that a growing percentage of customers prefer upstream
<tolszak> Ok guys, correct me if I'm wrong but odroid c4 is g12 board as it , also includes dt-bindings/gpio/meson-g12a-gpio.h
<chewitt> the decision point is usually based on media support; if your use-case required it, you are stuck with bsp code
<f_> chewitt: Sure, and as such they don't have enough resources to support mainline at the same time..right?
<chewitt> C4 is an SM1 board; derivative from g12a in many areas but also slightly evolved in others
luka177 has quit [Read error: Connection reset by peer]
<tolszak> N2 2 has something like that in dtsi : https://pastebin.com/xJKsyuHV
luka177 has joined #linux-amlogic
<chewitt> HK do the same as most vendors; support the BSP code that their upstream supplier provides and supports
<chewitt> and ship enough samples to known users in their ecosystem who do much of the porting and testing with upstream code
<tolszak> So you are saying adding it to C4 device tree is a no go?
<chewitt> C4 doesn't have an RTC chip on-board so it wouldn't achieve anything
<tolszak> chewitt: Ahh that's the case. I wonder how they add the i2c overlay in their ubuntu then
<chewitt> they hack stuff into their kernel(s) IIRC
<chewitt> tobetter only ever does git merge of new kernel releases onto the initial source that he curates, which means all the extra stuff is buried 50x pages deep
naoki has quit [Quit: naoki]
<tolszak> chewitt: f_: narmstrong_ Thanks for your time and expertise. The easiest will be to go with cp2112 then.
<chewitt> I attempted to promote the idea of rebasing the changes instead so that the extras are always visible at the top of the branch
<chewitt> but I got the impression he prefers the obscurity of nobody being able to find the 'magic' that was done in the branch
<f_> lol
<chewitt> the upstream kernel supports overlays .. you just need to add them to your kernel source and compile them, then load them via u-boot alongside the main board dtb
<f_> Amlogic code is magic code. Everyone knows that.
* f_ on his way to try making use of the mmc driver to load the FIP!
<tolszak> chewitt: I'm not brave enough to try it if noone else did :-).
<tolszak> Thanks guys!
<f_> But the mistake I discovered yesterday way really.....dumb..
<f_> BL1 really loads the first 48K it finds (will share a decompilation of the KII Pro BL1 and the lepotato BL1)
<lvrp16> f_: I keep missing you on IRC since our schedule seems to be 12 hours apart
<chewitt> @tolszak what are you trying to do?
<f_> lvrp16: no worries!
<tolszak> chewitt: Client want's to port device to c4 as c2 is not available anymore. All works except i2c. It took me a few hours. The form factor is the same.
<f_> tl;dr I tried to use memmap for the FIP when it wasn't even loaded on memory
<tolszak> The only change is 12v->5V converter so far. ALthough it might work with 5V/4A too, need to check it
<f_> and BL1 loads the first 48K with the expectation that that's the size of BL2, and then expects BL2 to load the rest from whatever boot device it's loaded from.
<chewitt> tolszak are they trying to use the RTC mezzanine board that HK sells?
<f_> and because BL1 can load BL2 from lots of storage devices...I have no idea how I should support them all
<f_> Amlogic did a good job at making sure their BL2 works for most intended use cases.
<tolszak> chewitt: I don't even know what it is... The want to buy this one https://www.hardkernel.com/shop/odroid-c4/ place in the device instead of odroid c2 and hope it will work. And it does actually but there is no i2c.
luka177 has quit [Ping timeout: 246 seconds]
<f_> but my TF-A BL2 port will probably just have a constant you define at compile-time for whatever storage medium you'd use...after all that's what some other SoCs seem to do
luka177 has joined #linux-amlogic
<tolszak> chewitt: Especially when i2c is in the specs on this site, sight...
<chewitt> the upstream device-tree only shows nodes for hardware that is present/used on the 'as shipped' board
<chewitt> hence N2 has the i2c3 node to support the (soldered to board) rtc chip
<chewitt> C4 has nothing using i2c soldered to the boards .. so no nodes present
<chewitt> the GPIO pins support stuff being connected .. but to use those you'll either need to use an overlay or mod the device-tree and build your own kernel
<chewitt> to add the required i2c nodes bits to support whatever it is that's being connected
<lvrp16> tolszak: if they just need the form factor, use a potato :D
<tolszak> chewitt: The latter is supper easy with yocto. As I said I modified the device tree before byt enabling microusb on odroid c2.
<f_> J'aime ma pomme de terre.
<f_> ;)
<f_> I currently use my lepotato as an SD card reader...until I receive a brand new one
<f_> Works quite well, honestly.
<chewitt> ^ the LePotato article is describing the process of loading an overlay from userspace
<chewitt> HK does similar things with their own software stack
<f_> oh nice, I don't even have to use pyamlboot
<tolszak> lvrp16: Unfortunately I think they will afraid of that, they stick to hardkernel since I remember.
<tolszak> Working on hc4 at the moment and odroid n2 plus.
<lvrp16> tolszak: whatever works for them
f11f12 has joined #linux-amlogic
<f11f12> jbrunet: on the axg DAC I have noise after the audio playback ends. It continues for a few seconds, then stops. Could this be related to some kind of clock that is stopped too late?
<f11f12> It put printk's in many functions but can't seem to find one that is called with a delay after the last sample.
<chewitt> ^ this makes the kernel build the dtbo (overlay) files
<chewitt> ^ this requires you to be using their bsp kernel
luka177 has quit [Ping timeout: 256 seconds]
<f_> Anyway..thought it was a DDR init issue as memcpy was failing....but it was actually me being dumb...
luka177 has joined #linux-amlogic
<f_> ..so I'll rollback to my port of Amlogic's old DDR code...turns out it works to an extent.
<f_> But I will continue that rewrite one day, for sure...that code will be deprecated at some point.
<cornelius> tobetter has a github which provides HK mainline 'sorta' support and the overlays for i2c.
<tolszak> chewitt: So I can't use it just by patching current linux-yocto, I need to use tobetter kernel right?
<chewitt> ¯\_(ツ)_/¯
<chewitt> I'd guess there are at least 4-5 different ways to "patch some i2c support" depending on what toolset you're trying to use
<chewitt> I have zero experience with yocto
<chewitt> but since you're probably trying to support a single device .. I'd just patch the kernel source that yocto uses to add what you need
<chewitt> (that requires you to know what you need)
<f_> Oh, and since I also have a lafrite I can try adding SPI support too!
<f_> Hah
<tolszak> chewitt: I only need i2c bus over gpio
<f_> I also have the eMMC and SD register base
<f_> Shouldn't be too hard
<f_> When talking about how BL2 loads stuff, if you look at Ghidra's decompilation, what they do is quite straightforward
<f_> You have `storage_load` which is just a wrapper of all other functions. It's supposed to run the right function for reading.
<f_> and it reads a register to know from which storage medium BL2 is loaded from
<f_> it actually doesn't do that by itself, but calls a rather short and straightforward function, `get_boot_device`.
<f_> then, depending on what it returns, decides which function to use
<f_> That's mostly about it.
<f_> Oh, and it's also responsible for printing 'Load <image> from <dev>, src: <src>, des: <dst>, size: <size>'.
<f_> >storage_load(0xc000,(ulong)&DAT_01400000,0x4000,(byte *)s_fip_header_d90094c8);
luka177 has quit [Ping timeout: 245 seconds]
luka177 has joined #linux-amlogic
<f_> Amlogic BL2 seems to load the FIP header at address 0x1400000
rpardini has quit [Quit: ZZZzzz…]
<f_> Honestly making TF-A load things from the SD card shouldn't be too hard
<f_> Should be fairly doable.
<tolszak> chewitt: I will try to bother tobetter a bit. Ideally I would like to only patch dts and do not touch kernel source at all if possible. Will update if I know something.
<chewitt> then generate a patch .. and see what happens
<chewitt> clone the source .. make and commit changes .. generate patch .. copy to relevant folder in yocto build-system .. build
buzzmarshall has joined #linux-amlogic
luka177 has quit [Ping timeout: 256 seconds]
luka177 has joined #linux-amlogic
asriel has quit [Quit: Don't drink the water. They put something in it to make you forget.]
asriel has joined #linux-amlogic
luka177 has quit [Ping timeout: 245 seconds]
luka177 has joined #linux-amlogic
rpardini has joined #linux-amlogic
luka177 has quit [Ping timeout: 248 seconds]
f_ is now known as funderscore
funderscore is now known as f_
luka177 has joined #linux-amlogic
luka177 has quit [Read error: Connection reset by peer]
luka177 has joined #linux-amlogic
rpardini has quit [Quit: ZZZzzz…]
luka177 has quit [Ping timeout: 245 seconds]
rpardini has joined #linux-amlogic
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 246 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 246 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 245 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 246 seconds]
luka177 has joined #linux-amlogic
vagrantc has joined #linux-amlogic
f11f12 has quit [Quit: Leaving]
rpardini has quit [Quit: ZZZzzz…]
luka177 has quit [Ping timeout: 240 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 260 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 245 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 244 seconds]
f_ has quit [Excess Flood]
f_ has joined #linux-amlogic
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 258 seconds]
chewitt has quit [Quit: Zzz..]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 246 seconds]
luka177 has joined #linux-amlogic
f_ has quit [Quit: Disconnecting.]
luka177 has quit [Ping timeout: 244 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 252 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 260 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 246 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 250 seconds]
rpardini has joined #linux-amlogic
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 256 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 245 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 260 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 246 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Ping timeout: 256 seconds]
luka177 has joined #linux-amlogic
luka177 has quit [Read error: Connection reset by peer]
luka177 has joined #linux-amlogic
rpardini has quit [Quit: ZZZzzz…]
Daanct12 has quit [Remote host closed the connection]
GNUtoo has quit [Ping timeout: 246 seconds]
GNUtoo has joined #linux-amlogic