Go to advanced search

by PhilE
Tue Mar 19, 2019 9:34 am
Forum: Device Tree
Topic: How to use 2 SC16IS752,I USE I2C
Replies: 23
Views: 318

Re: How to use 2 SC16IS752,I USE I2C

Here are builds to cover both cases: 4.14.98+ and 4.14.98-v7+.
by PhilE
Mon Mar 18, 2019 4:36 pm
Forum: Device Tree
Topic: Set up GPIO clock from device tree
Replies: 12
Views: 3441

Re: Set up GPIO clock from device tree

The problem is, as you've surmised, that you need to "find some place to reference this pin and consume the clock". Unfortunately, unlike pinctrl that configures pins for a device node whether or not it actually uses them , clocks have to be requested by the driver. Similarly, the "clock-frequency" ...
by PhilE
Mon Mar 18, 2019 1:59 pm
Forum: Device Tree
Topic: How to use 2 SC16IS752,I USE I2C
Replies: 23
Views: 318

Re: How to use 2 SC16IS752,I USE I2C

Is that a "4.14.98-v7+" kernel or do you really have a BCM2835 Pi (original A or B, A+, B+, Zero or CM1)?
by PhilE
Mon Mar 18, 2019 9:03 am
Forum: Device Tree
Topic: How to use 2 SC16IS752,I USE I2C
Replies: 23
Views: 318

Re: How to use 2 SC16IS752,I USE I2C

Sorry it's taken a while to get back to this, but I have a test build of the module with some extra debugging - you can download it here: https://drive.google.com/open?id=0B_P-i4u-SLBXYTJUbnBmYkFaUHM It should work with the kernel you have - install it with: sudo cp sc16is7xx.ko /lib/modules/4.14.50...
by PhilE
Fri Mar 15, 2019 4:04 pm
Forum: Compute Module
Topic: Enabling UART1 on CM3
Replies: 1
Views: 143

Re: Enabling UART1 on CM3

Sorry for the delay - I've just seen your post.

Do you have "8250.nr_uarts=1" in your cmdline.txt? It's normally provided by the chosen/bootargs in the Device Tree, but the default Compute Module DTS files don't set it.
by PhilE
Fri Mar 15, 2019 11:58 am
Forum: Bare metal, Assembly language
Topic: Puzzled, Mem speed?
Replies: 21
Views: 534

Re: Puzzled, Mem speed?

Post your code - somebody may spot something.
by PhilE
Thu Mar 14, 2019 4:36 pm
Forum: Device Tree
Topic: synaptics rmi4-i2c, driver doesn't load
Replies: 16
Views: 275

Re: synaptics rmi4-i2c, driver doesn't load

For the record, the module and alias searches were always going to fail because you have (now) built the drivers into the kernel. But this now sounds like a hardware issue.
by PhilE
Thu Mar 14, 2019 2:19 pm
Forum: Device Tree
Topic: synaptics rmi4-i2c, driver doesn't load
Replies: 16
Views: 275

Re: synaptics rmi4-i2c, driver doesn't load

It sounds like your build was incomplete. Did you follow the instructions here?
by PhilE
Thu Mar 14, 2019 1:44 pm
Forum: Device Tree
Topic: synaptics rmi4-i2c, driver doesn't load
Replies: 16
Views: 275

Re: synaptics rmi4-i2c, driver doesn't load

The easy way on a running system is to type "sudo depmod". There are parameters that specify root directories, kernel versions, etc., but the default is to work in /lib/modules/<current-version>. Afterwards, run the grep again to confirm the update has had the desired effect.
by PhilE
Thu Mar 14, 2019 9:58 am
Forum: Device Tree
Topic: synaptics rmi4-i2c, driver doesn't load
Replies: 16
Views: 275

Re: synaptics rmi4-i2c, driver doesn't load

I have written a device tree overlay and compiled a kernel with rmi4-i2c support enabled (actually I enabled all rmi4 drivers).
Assuming this is true, have you updated the aliases file?

Code: Select all

$ grep rmi4 /lib/modules/`uname -r`/modules.alias
by PhilE
Wed Mar 13, 2019 1:34 pm
Forum: Device Tree
Topic: Devicetree and u-boot
Replies: 5
Views: 115

Re: Devicetree and u-boot

It's probably a mismatch between the drivers built and the drivers expected by the Device Tree.
by PhilE
Wed Mar 13, 2019 10:57 am
Forum: Compute Module
Topic: I2S - PCM
Replies: 18
Views: 3833

Re: I2S - PCM

So you're just using the Pi as a clock source? You need to trick the Pi to think it is playing or recording some audio. This is going to require the creation of an overlay, probably using the "dmic-codec" dummy microphone (https://github.com/raspberrypi/linux/blob/rpi-4.19.y/Documentation/devicetree...
by PhilE
Wed Mar 13, 2019 10:34 am
Forum: Device Tree
Topic: Devicetree and u-boot
Replies: 5
Views: 115

Re: Devicetree and u-boot

The second is the Device Tree blob for an "upstream" kernel - a kernel that doesn't use any of Raspberry Pi's modifications. The most significant difference is that they don't use the FIQ-enhanced dwc_otg USB driver, so performance can be worse.
by PhilE
Wed Mar 13, 2019 9:56 am
Forum: Compute Module
Topic: I2S - PCM
Replies: 18
Views: 3833

Re: I2S - PCM

It sounds like you have an ADC capturing the output of the DAC, but it would help if you could explain the application a bit more.

I2S clocking is usually best done with an external crystal - the Pi can generate some I2S clocks, but they won't be as clean.
by PhilE
Wed Mar 13, 2019 9:55 am
Forum: Device Tree
Topic: How to use 2 SC16IS752,I USE I2C
Replies: 23
Views: 318

Re: How to use 2 SC16IS752,I USE I2C

Please remember that even though the driver is part of the standard kernel tree, and we build it and supply overlays so it can be used, the SC16IS752 is not a device specifically supported by Raspberry Pi.
by PhilE
Wed Mar 13, 2019 9:47 am
Forum: Device Tree
Topic: How to use 2 SC16IS752,I USE I2C
Replies: 23
Views: 318

Re: How to use 2 SC16IS752,I USE I2C

Thanks - I interpret those results to mean that both configurations are correct, and that the driver is failing to be instantiated twice. I can read the code to see if anything sticks out as a possible reason, but I may need to modify the driver to add extra debugging. This will be a low priority ta...
by PhilE
Wed Mar 13, 2019 9:24 am
Forum: Device Tree
Topic: How to use 2 SC16IS752,I USE I2C
Replies: 23
Views: 318

Re: How to use 2 SC16IS752,I USE I2C

Yes, that's what I was looking for, and it all looks correct - both instances are present, and each has its own clock. The order the kernel processes the Device Tree isn't defined, but if you swap the order of dtoverlays does it make any difference to which device gets used (the device showing as ==...
by PhilE
Wed Mar 13, 2019 8:36 am
Forum: Device Tree
Topic: How to use 2 SC16IS752,I USE I2C
Replies: 23
Views: 318

Re: How to use 2 SC16IS752,I USE I2C

Ha ha. If you don't have an internet connection, use your preferred method to log the output of "dtc -I fs /proc/device-tree" and upload it somewhere I can see it.
by PhilE
Tue Mar 12, 2019 4:54 pm
Forum: Device Tree
Topic: How to use 2 SC16IS752,I USE I2C
Replies: 23
Views: 318

Re: How to use 2 SC16IS752,I USE I2C

That is strange - others have had success with two SC16IS752 over I2C.

Can you run "dtc -I fs /proc/device-tree | pastebinit" and post the link? You may need to "sudo apt-get install pastebinit".
by PhilE
Tue Mar 12, 2019 3:36 pm
Forum: Device Tree
Topic: Devicetree and u-boot
Replies: 5
Views: 115

Re: Devicetree and u-boot

How could I have known some random i2c nodes would activate wifi and ethernet and what is the mechanism by which this happens? I don't believe they do. There must be some other effect at work. How does a (to an outsider) null merge lead to changes in the device tree with such a significant effect? ...
by PhilE
Tue Mar 12, 2019 11:36 am
Forum: Device Tree
Topic: How to use 2 SC16IS752,I USE I2C
Replies: 23
Views: 318

Re: How to use 2 SC16IS752,I USE I2C

The hardware does appear to be detectable - with both dtoverlay lines enabled, what does "dmesg" report after booting?
by PhilE
Tue Mar 12, 2019 11:27 am
Forum: Device Tree
Topic: How to use 2 SC16IS752,I USE I2C
Replies: 23
Views: 318

Re: How to use 2 SC16IS752,I USE I2C

Now try steps 2) and 3).
by PhilE
Tue Mar 12, 2019 10:09 am
Forum: Device Tree
Topic: How to use 2 SC16IS752,I USE I2C
Replies: 23
Views: 318

Re: How to use 2 SC16IS752,I USE I2C

There are a few things that could be going wrong, but let's start with the hardware. 1) Does "i2c-detect -y 1" show both devices? 2) Comment out the second dtoverlay, reboot and test it - does an interface appear? 3) Uncomment the second overlay, comment out the first dtoverlay, reboot and test it -...
by PhilE
Mon Mar 11, 2019 12:55 pm
Forum: Advanced users
Topic: devicetree overlay for MCP23017 GPIO expander
Replies: 66
Views: 14827

Re: devicetree overlay for MCP23017 GPIO expander

What is your python code trying to do with the interrupt? That pin has already been claimed by the kernel driver, and it is rarely a good idea to have the same hardware driven by multiple bits of software.
by PhilE
Tue Mar 05, 2019 12:18 pm
Forum: Device Tree
Topic: Devicetree duplicate labels
Replies: 2
Views: 146

Re: Devicetree duplicate labels

You are correct that labels do have to be unique within a translation unit (a base DTB or an overlay) (but they are lost during compilation so don't have to be globally unique). One option would be to have multiple instances of the i2c_gpio fragment, each referencing a different pinctrl fragment, bu...

Go to advanced search