On 27/11/2019 21:59, Richard MQ wrote:
> Torsten Duwe wrote:
>> On Mon, 25 Nov 2019 20:15:26 +0000
>> Richard MQ <osl2...@gmail.com> wrote:
>>
>>> And I already knew about /boot/efi/extraconfig.txt and had
>>> dtoverlay=hifiberry-dacplus to no avail, I have pre-pended
>>> dtparam=i2s=on as suggested but still no dice (nothing shows up in
>>> hwinfo, nor Yast - Sound Card)
>>>
>>> @Torsten - please can you advise where to configure the strings and
>>> addresses that you mention?
>>
>> Accessing the little box, which has been running happily for quite some
>> time now, I hope I can remember the tweaks I had to do back then:
>>
>> It is a RPi Zero W, with a "justboom amp zero" pHAT. The point is,
>> no overlay matched it exactly back then so I chose a compatible chip
>> from the "iqaudio-dac" and fixed the I2C address, IIRC.
>>
>> config.txt has:
>> ---------------
>> dtoverlay=iqaudio-dac
>> dtparam=audio=on
>> dtparam=i2c0=on
>> dtparam=i2c1=on
>>
>> The overlay produces in my fdt:
>> i2c@7e804000 {
>> compatible = "brcm,bcm2708-i2c";
>> [...]
>> pcm5122@4d {
>> status = "okay";
>> reg = <0x4d>;
>> compatible = "ti,pcm5122";
>> #sound-dai-cells = <0x0>;
>> };
>> The kernel loads snd_soc_pcm512x_i2c and dmesg yields:
>>
>> snd-rpi-iqaudio-dac soc:sound: pcm512x-hifi <-> 20203000.i2s mapping ok
>>
>> hifiberry-dacplus already has an overlay that should work out of the
>> box, in theory.
>
> Thanks Torsten,
>
> Am I right in thinking I need "fdtdump" (or is it "dtoverlay"?) to see the
> fdt?
> I seem to be lacking the key tools to debug this, and can't work out where to
> get them. Please can anyone point me at a source for "fdtdump", "vcdbg",
> "dtoverlay" etc as "zypper se", googling for e.g. "opensuse raspberry vcdbg"
> are
> not giving me anything useful.
>
There are two ways. You can use dtc tool (zypper in dtc).
To see the device-tree use:
dtc -I dtb -O dts /path/to/your/device-tree.dtb
or
dtc -I fs -O dts /proc/device-tree
You can also use U-Boot to read the device tree, I suppose through this:
fdt addr $fdtcontroladdr
fdt list <your path or empty>
fdt print
> Also I clearly need to bone up on the device tree implementation. I have been
> reading
> https://www.raspberrypi.org/documentation/configuration/device-tree.md
> but if anything I think I am more confused than ever! Is there a better intro?
>
Have a look on the device-tree for dummies presentation and slides:
https://www.youtube.com/watch?v=m_NyYEBxfn8
https://elinux.org/images/f/f9/Petazzoni-device-tree-dummies_0.pdf
I find them very helpfull.
Regards,
Matthias
--
To unsubscribe, e-mail: opensuse-arm+unsubscr...@opensuse.org
To contact the owner, e-mail: opensuse-arm+ow...@opensuse.org