Description
I am also documenting my ongoing debugging effort on the forums in hopes of getting some insights from the larger RPi audience, but so far the thread has been radio silence. This particular bit looks like a bug hence the report for further investigation by more knowledgeable device tree users.
https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=248736
Describe the bug
In the device tree overlay for this device (I2C version only has been checked), There are 2 fields for the clocking frequency "clock-frequency=...", however it appears that only 1 gets updated as a result of the override. I haven't fully confirmed this is truly a bug, but I can't get the device to work on my crystal frequency of 12.288MHz hence the investigation into the possible causes.
To reproduce
Instantiate the device in the device tree using the clock-frequency override, in my example
dtoverlay=sc16is752-i2c,int_pin=503,xtal=12288000 (note the gpio 503 is an MCP23017 expander also on the i2c bus). I have not fully confirmed the gpio503 is correct as I see absolutely no activity on the interrupt signal from the chip so I haven't inspected the gpio in software to confirm the mapping has succeeded as predicted.
Inspect the device tree using the command dtc -I fs /proc/device-tree and locate the SC16IS752 device, which in my case yields the following
sc16is752@4d {
compatible = "nxp,sc16is752";
clocks = <0x84>;
gpio-controller;
status = "okay";
i2c-max-frequency = <0x61a80>;
interrupt-parent = <0x10>;
interrupts = <0x1f1 0x2>;
phandle = <0x85>;
reg = <0x4d>;
#gpio-cells = <0x0>;
clock-frequency = <0xbb8000>;
sc16is752_clk {
compatible = "fixed-clock";
#clock-cells = <0x0>;
phandle = <0x84>;
clock-frequency = <0xe10000>;
};
};
Here is the full dt if needed
dtc -I fs /proc/device-tree
<stdout>: Warning (unit_address_vs_reg): Node /soc has a reg or ranges property, but no unit name
<stdout>: Warning (unit_address_vs_reg): Node /soc/vchiq has a reg or ranges property, but no unit name
<stdout>: Warning (unit_address_vs_reg): Node /soc/i2c@7e804000/ads1015 has a reg or ranges property, but no unit name
<stdout>: Warning (unit_address_vs_reg): Node /soc/i2c@7e804000/ads1015/channel_a has a reg or ranges property, but no unit name
<stdout>: Warning (unit_address_vs_reg): Node /soc/gpiomem has a reg or ranges property, but no unit name
<stdout>: Warning (unit_address_vs_reg): Node /soc/axiperf has a reg or ranges property, but no unit name
<stdout>: Warning (unit_address_vs_reg): Node /soc/reg_1v8@0 has a unit name, but no reg property
<stdout>: Warning (unit_address_vs_reg): Node /memory has a reg or ranges property, but no unit name
<stdout>: Warning (unit_address_vs_reg): Node /axi/vc_mem has a reg or ranges property, but no unit name
<stdout>: Warning (avoid_default_addr_size): Relying on default #address-cells value for /axi/vc_mem
<stdout>: Warning (avoid_default_addr_size): Relying on default #size-cells value for /axi/vc_mem
/dts-v1/;
/ {
compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
serial-number = "000000006086d354";
model = "Raspberry Pi 3 Model B Rev 1.2";
memreserve = <0x3b400000 0x4c00000>;
interrupt-parent = <0x1>;
#address-cells = <0x1>;
#size-cells = <0x1>;
clocks {
compatible = "simple-bus";
#address-cells = <0x1>;
#size-cells = <0x0>;
clock@3 {
compatible = "fixed-clock";
#clock-cells = <0x0>;
phandle = <0x4>;
reg = <0x3>;
clock-output-names = "osc";
clock-frequency = <0x124f800>;
};
clock@4 {
compatible = "fixed-clock";
#clock-cells = <0x0>;
phandle = <0x18>;
reg = <0x4>;
clock-output-names = "otg";
clock-frequency = <0x1c9c3800>;
};
};
__overrides__ {
pwr_led_gpio = "", "", "", "/gpios:4";
cam0-led-ctrl;
i2c1 = "", "", "", "#status";
i2c_vc = "", "", "", "\"status";
sd_overclock = "", "", "", "'brcm,overclock-50:0";
sdio_overclock = "", "", "", "(brcm,overclock-50:0";
i2c0_baudrate = "", "", "", "\"clock-frequency:0";
sd_pio_limit = "", "", "", "'brcm,pio-limit:0";
act_led_trigger = "", "", "", ".linux,default-trigger";
audio = "", "", "", "$status";
sd_debug = "", "", "", "'brcm,debug";
cam0-pwdn-ctrl;
cache_line_size = [00 00 00 1d 63 61 63 68 65 2d 6c 69 6e 65 2d 73 69 7a 65 3a 30 00];
cam0-led;
i2c1_baudrate = "", "", "", "#clock-frequency:0";
spi = "", "", "", "!status";
i2c_arm = "", "", "", "#status";
pwr_led_activelow = "", "", "", "/gpios:8";
uart0 = [00 00 00 1e 73 74 61 74 75 73 00];
i2c2_iknowwhatimdoing = [00 00 00 16 73 74 61 74 75 73 00];
i2s = "", "", "", " status";
i2c0 = "", "", "", "\"status";
arm_freq = "", "", "", "*clock-frequency:0", "", "", "", "+clock-frequency:0", "", "", "", ",clock-frequency:0", "", "", "", "-clock-frequency:0";
watchdog = "", "", "", "%status";
i2c_baudrate = "", "", "", "#clock-frequency:0";
i2c_vc_baudrate = "", "", "", "\"clock-frequency:0";
axiperf = "", "", "", ")status";
act_led_activelow = "", "", "", ".gpios:8";
i2c2_baudrate = [00 00 00 16 63 6c 6f 63 6b 2d 66 72 65 71 75 65 6e 63 79 3a 30 00];
sd_force_pio = "", "", "", "'brcm,force-pio?";
pwr_led_trigger = "", "", "", "/linux,default-trigger";
cam0-pwdn;
uart1 = [00 00 00 1f 73 74 61 74 75 73 00];
i2c_arm_baudrate = "", "", "", "#clock-frequency:0";
random = "", "", "", "&status";
act_led_gpio = "", "", "", ".gpios:4";
i2c = "", "", "", "#status";
};
system {
linux,serial = <0x0 0x6086d354>;
linux,revision = <0xa52082>;
};
__symbols__ {
uart0_gpio14 = "/soc/gpio@7e200000/uart0_gpio14";
pwm = "/soc/pwm@7e20c000";
gpclk1_gpio5 = "/soc/gpio@7e200000/gpclk1_gpio5";
clk_usb = "/clocks/clock@4";
pixelvalve0 = "/soc/pixelvalve@7e206000";
uart0_ctsrts_gpio30 = "/soc/gpio@7e200000/uart0_ctsrts_gpio30";
uart1_ctsrts_gpio16 = "/soc/gpio@7e200000/uart1_ctsrts_gpio16";
uart0_gpio32 = "/soc/gpio@7e200000/uart0_gpio32";
intc = "/soc/interrupt-controller@7e00b200";
spi2 = "/soc/spi@7e2150c0";
jtag_gpio4 = "/soc/gpio@7e200000/jtag_gpio4";
dsi1 = "/soc/dsi@7e700000";
clocks = "/soc/cprman@7e101000";
i2c1 = "/soc/i2c@7e804000";
i2c_vc = "/soc/i2c@7e205000";
firmwarekms = "/soc/firmwarekms@7e600000";
smi = "/soc/smi@7e600000";
uart1_ctsrts_gpio42 = "/soc/gpio@7e200000/uart1_ctsrts_gpio42";
spi0 = "/soc/spi@7e204000";
thermal = "/soc/thermal@7e212000";
vdd_5v0_reg = "/fixedregulator_5v0";
vchiq = "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/soc/vchiq";
sdhost = "/soc/mmc@7e202000";
aux = "/soc/aux@0x7e215000";
gpio = "/soc/gpio@7e200000";
gpclk0_gpio4 = "/soc/gpio@7e200000/gpclk0_gpio4";
pwm0_gpio12 = "/soc/gpio@7e200000/pwm0_gpio12";
pwm1_gpio19 = "/soc/gpio@7e200000/pwm1_gpio19";
pwm0_gpio40 = "/soc/gpio@7e200000/pwm0_gpio40";
gpclk2_gpio43 = "/soc/gpio@7e200000/gpclk2_gpio43";
dpi = "/soc/dpi@7e208000";
vcsm = "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/soc/vcsm";
v3d = "/soc/v3d@7ec00000";
audio = "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/soc/audio";
vdd_3v3_reg = "/fixedregulator_3v3";
uart1_ctsrts_gpio30 = "/soc/gpio@7e200000/uart1_ctsrts_gpio30";
dma = "/soc/dma@7e007000";
spidev1 = "/soc/spi@7e204000/spidev@1";
spi0_gpio35 = "/soc/gpio@7e200000/spi0_gpio35";
vc4 = "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/soc/gpu";
pwm1_gpio45 = "/soc/gpio@7e200000/pwm1_gpio45";
cpu3 = "/cpus/cpu@3";
pcm_gpio28 = "/soc/gpio@7e200000/pcm_gpio28";
dpi_gpio0 = "/soc/gpio@7e200000/dpi_gpio0";
power = "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/soc/power";
soc = "/soc";
i2c0_gpio0 = "/soc/gpio@7e200000/i2c0_gpio0";
pcm_gpio18 = "/soc/gpio@7e200000/pcm_gpio18";
leds = "/leds";
csi1 = "/soc/csi1@7e801000";
i2s_pins = "/soc/gpio@7e200000/i2s";
firmware = "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/soc/firmware";
cpu1 = "/cpus/cpu@1";
mmc = "/soc/mmc@7e300000";
usbphy = "/phy";
pixelvalve1 = "/soc/pixelvalve@7e207000";
spi = "/soc/spi@7e204000";
spi0_pins = "/soc/gpio@7e200000/spi0_pins";
i2c_arm = "/soc/i2c@7e804000";
clk_osc = "/clocks/clock@3";
ethernet = "/soc/usb@7e980000/usb1@1/usbether@1";
uart0 = "/soc/serial@7e201000";
pwm1_gpio13 = "/soc/gpio@7e200000/pwm1_gpio13";
i2c1_pins = "/soc/gpio@7e200000/i2c1";
cpu_thermal = "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/thermal-zones/cpu-thermal";
fb = "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/soc/fb";
pwm1_gpio41 = "/soc/gpio@7e200000/pwm1_gpio41";
sdhost_pins = "/soc/gpio@7e200000/sdhost_gpio48";
dpi_18bit_gpio0 = "/soc/gpio@7e200000/dpi_18bit_gpio0";
spi0_gpio7 = "/soc/gpio@7e200000/spi0_gpio7";
i2c2 = "/soc/i2c@7e805000";
uart1_pins = "/soc/gpio@7e200000/uart1_pins";
i2c1_gpio44 = "/soc/gpio@7e200000/i2c1_gpio44";
i2c0_gpio28 = "/soc/gpio@7e200000/i2c0_gpio28";
i2c_slave_gpio18 = "/soc/gpio@7e200000/i2c_slave_gpio18";
i2s = "/soc/i2s@7e203000";
emmc_gpio48 = "/soc/gpio@7e200000/emmc_gpio48";
spi1 = "/soc/spi@7e215080";
virtgpio = "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/soc/virtgpio";
usb = "/soc/usb@7e980000";
dsi0 = "/soc/dsi@7e209000";
i2c1_gpio2 = "/soc/gpio@7e200000/i2c1_gpio2";
expgpio = "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/soc/expgpio";
uart0_ctsrts_gpio38 = "/soc/gpio@7e200000/uart0_ctsrts_gpio38";
audio_pins = "/soc/gpio@7e200000/audio_pins";
i2c0 = "/soc/i2c@7e205000";
spi1_gpio16 = "/soc/gpio@7e200000/spi1_gpio16";
i2c0_pins = "/soc/gpio@7e200000/i2c0";
pwr_led = "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/leds/pwr";
watchdog = "/soc/watchdog@7e100000";
jtag_gpio22 = "/soc/gpio@7e200000/jtag_gpio22";
spi2_gpio40 = "/soc/gpio@7e200000/spi2_gpio40";
uart0_pins = "/soc/gpio@7e200000/uart0_pins";
vec = "/soc/vec@7e806000";
local_intc = "/soc/local_intc@40000000";
i2c0_gpio44 = "/soc/gpio@7e200000/i2c0_gpio44";
axiperf = "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/soc/axiperf";
spi0_cs_pins = "/soc/gpio@7e200000/spi0_cs_pins";
sound = "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/soc/sound";
hvs = "/soc/hvs@7e400000";
uart0_ctsrts_gpio16 = "/soc/gpio@7e200000/uart0_ctsrts_gpio16";
act_led = "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/leds/act";
gpclk2_gpio6 = "/soc/gpio@7e200000/gpclk2_gpio6";
spidev0 = "/soc/spi@7e204000/spidev@0";
sdhost_gpio48 = "/soc/gpio@7e200000/sdhost_gpio48";
bt_pins = "/soc/gpio@7e200000/bt_pins";
emmc_gpio34 = "/soc/gpio@7e200000/emmc_gpio34";
gpclk1_gpio44 = "/soc/gpio@7e200000/gpclk1_gpio44";
uart1_gpio14 = "/soc/gpio@7e200000/uart1_gpio14";
uart0_gpio36 = "/soc/gpio@7e200000/uart0_gpio36";
sdio_pins = "/soc/gpio@7e200000/sdio_pins";
cpus = "/cpus";
cpu2 = "/cpus/cpu@2";
uart1_gpio32 = "/soc/gpio@7e200000/uart1_gpio32";
hdmi = "/soc/hdmi@7e902000";
pixelvalve2 = "/soc/pixelvalve@7e807000";
pwm0_gpio18 = "/soc/gpio@7e200000/pwm0_gpio18";
gpclk1_gpio42 = "/soc/gpio@7e200000/gpclk1_gpio42";
mailbox = "/soc/mailbox@7e00b880";
uart1_gpio40 = "/soc/gpio@7e200000/uart1_gpio40";
emmc_gpio22 = "/soc/gpio@7e200000/emmc_gpio22";
uart1 = "/soc/serial@7e215040";
csi0 = "/soc/csi0@7e800000";
random = "/soc/rng@7e104000";
i2c = "/soc/i2c@7e804000";
cpu0 = "/cpus/cpu@0";
};
soc {
compatible = "simple-bus";
ranges = <0x7e000000 0x3f000000 0x1000000 0x40000000 0x40000000 0x1000>;
#address-cells = <0x1>;
#size-cells = <0x1>;
phandle = <0x32>;
dma-ranges = <0xc0000000 0x0 0x3f000000>;
serial@7e201000 {
compatible = "brcm,bcm2835-pl011", "arm,pl011", "arm,primecell";
clocks = <0x8 0x13 0x8 0x14>;
clock-names = "uartclk", "apb_pclk";
status = "okay";
interrupts = <0x2 0x19>;
phandle = <0x1e>;
arm,primecell-periphid = <0x241011>;
reg = <0x7e201000 0x1000>;
pinctrl-0 = <0x9 0xa>;
cts-event-workaround;
pinctrl-names = "default";
};
pixelvalve@7e207000 {
compatible = "brcm,bcm2835-pixelvalve1";
status = "disabled";
interrupts = <0x2 0xe>;
phandle = <0x62>;
reg = <0x7e207000 0x100>;
};
cprman@7e101000 {
compatible = "brcm,bcm2835-cprman";
clocks = <0x4 0x5 0x0 0x5 0x1 0x5 0x2 0x6 0x0 0x6 0x1 0x6 0x2>;
firmware = <0x7>;
#clock-cells = <0x1>;
phandle = <0x8>;
reg = <0x7e101000 0x2000>;
sgtl5000_mclk {
compatible = "fixed-clock";
#clock-cells = <0x0>;
phandle = <0x7a>;
clock-output-names = "sgtl5000-mclk";
clock-frequency = <0xbb8000>;
};
};
thermal@7e212000 {
compatible = "brcm,bcm2837-thermal";
clocks = <0x8 0x1b>;
#thermal-sensor-cells = <0x0>;
status = "okay";
phandle = <0x2>;
reg = <0x7e212000 0x8>;
};
hvs@7e400000 {
compatible = "brcm,bcm2835-hvs";
status = "disabled";
interrupts = <0x2 0x1>;
phandle = <0x67>;
reg = <0x7e400000 0x6000>;
};
gpio@7e200000 {
compatible = "brcm,bcm2835-gpio";
gpio-controller;
#interrupt-cells = <0x2>;
interrupts = <0x2 0x11 0x2 0x12>;
phandle = <0x10>;
reg = <0x7e200000 0xb4>;
#gpio-cells = <0x2>;
interrupt-controller;
uart0_gpio14 {
brcm,pins = <0xe 0xf>;
phandle = <0x52>;
brcm,function = <0x4>;
};
gpclk1_gpio5 {
brcm,pins = <0x5>;
phandle = <0x38>;
brcm,function = <0x4>;
};
uart0_ctsrts_gpio30 {
brcm,pins = <0x1e 0x1f>;
phandle = <0x54>;
brcm,function = <0x7>;
};
uart1_ctsrts_gpio16 {
brcm,pins = <0x10 0x11>;
phandle = <0x59>;
brcm,function = <0x2>;
};
uart0_gpio32 {
brcm,pins = <0x20 0x21>;
phandle = <0x55>;
brcm,function = <0x7>;
};
jtag_gpio4 {
brcm,pins = <0x4 0x5 0x6 0xc 0xd>;
phandle = <0x43>;
brcm,function = <0x2>;
};
i2c1 {
brcm,pins = <0x2 0x3>;
phandle = <0x15>;
brcm,function = <0x4>;
};
uart1_ctsrts_gpio42 {
brcm,pins = <0x2a 0x2b>;
phandle = <0x5d>;
brcm,function = <0x2>;
};
gpclk0_gpio4 {
brcm,pins = <0x4>;
phandle = <0x37>;
brcm,function = <0x4>;
};
pwm0_gpio12 {
brcm,pins = <0xc>;
phandle = <0x47>;
brcm,function = <0x4>;
};
pwm1_gpio19 {
brcm,pins = <0x13>;
phandle = <0x4b>;
brcm,function = <0x2>;
};
pwm0_gpio40 {
brcm,pins = <0x28>;
phandle = <0x49>;
brcm,function = <0x4>;
};
gpclk2_gpio43 {
brcm,pins = <0x2b>;
phandle = <0x3c>;
brcm,function = <0x4>;
};
uart1_ctsrts_gpio30 {
brcm,pins = <0x1e 0x1f>;
phandle = <0x5b>;
brcm,function = <0x2>;
};
spi0_gpio35 {
brcm,pins = <0x23 0x24 0x25 0x26 0x27>;
phandle = <0x4f>;
brcm,function = <0x4>;
};
pwm1_gpio45 {
brcm,pins = <0x2d>;
phandle = <0x4d>;
brcm,function = <0x4>;
};
pcm_gpio28 {
brcm,pins = <0x1c 0x1d 0x1e 0x1f>;
phandle = <0x46>;
brcm,function = <0x6>;
};
dpi_gpio0 {
brcm,pins = <0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b>;
phandle = <0x33>;
brcm,function = <0x6>;
};
i2c0_gpio0 {
brcm,pins = <0x0 0x1>;
phandle = <0x3d>;
brcm,function = <0x4>;
};
pcm_gpio18 {
brcm,pins = <0x12 0x13 0x14 0x15>;
phandle = <0x45>;
brcm,function = <0x4>;
};
spi0_pins {
brcm,pins = <0x9 0xa 0xb>;
phandle = <0xe>;
brcm,function = <0x4>;
};
pwm1_gpio13 {
brcm,pins = <0xd>;
phandle = <0x4a>;
brcm,function = <0x4>;
};
pwm1_gpio41 {
brcm,pins = <0x29>;
phandle = <0x4c>;
brcm,function = <0x4>;
};
dpi_18bit_gpio0 {
brcm,pins = <0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 0x11 0x12 0x13 0x14 0x15>;
phandle = <0x5e>;
brcm,function = <0x6>;
};
spi0_gpio7 {
brcm,pins = <0x7 0x8 0x9 0xa 0xb>;
phandle = <0x4e>;
brcm,function = <0x4>;
};
uart1_pins {
brcm,pins;
phandle = <0x13>;
brcm,pull;
brcm,function;
};
i2c1_gpio44 {
brcm,pins = <0x2c 0x2d>;
phandle = <0x41>;
brcm,function = <0x6>;
};
i2c0_gpio28 {
brcm,pins = <0x1c 0x1d>;
phandle = <0x3e>;
brcm,function = <0x4>;
};
i2c_slave_gpio18 {
brcm,pins = <0x12 0x13 0x14 0x15>;
phandle = <0x42>;
brcm,function = <0x7>;
};
i2s {
brcm,pins = <0x12 0x13 0x14 0x15>;
phandle = <0xd>;
brcm,function = <0x4>;
};
emmc_gpio48 {
brcm,pins = <0x30 0x31 0x32 0x33 0x34 0x35>;
phandle = <0x36>;
brcm,function = <0x7>;
};
i2c1_gpio2 {
brcm,pins = <0x2 0x3>;
phandle = <0x40>;
brcm,function = <0x4>;
};
uart0_ctsrts_gpio38 {
brcm,pins = <0x26 0x27>;
phandle = <0x57>;
brcm,function = <0x6>;
};
audio_pins {
brcm,pins = <0x28 0x29>;
phandle = <0x1c>;
brcm,function = <0x4>;
};
i2c0 {
brcm,pins = <0x0 0x1>;
phandle = <0x11>;
brcm,function = <0x4>;
};
spi1_gpio16 {
brcm,pins = <0x10 0x11 0x12 0x13 0x14 0x15>;
phandle = <0x50>;
brcm,function = <0x3>;
};
jtag_gpio22 {
brcm,pins = <0x16 0x17 0x18 0x19 0x1a 0x1b>;
phandle = <0x44>;
brcm,function = <0x3>;
};
spi2_gpio40 {
brcm,pins = <0x28 0x29 0x2a 0x2b 0x2c 0x2d>;
phandle = <0x51>;
brcm,function = <0x3>;
};
uart0_pins {
brcm,pins = <0x20 0x21>;
phandle = <0x9>;
brcm,pull = <0x0 0x2>;
brcm,function = <0x7>;
};
i2c0_gpio44 {
brcm,pins = <0x2c 0x2d>;
phandle = <0x3f>;
brcm,function = <0x5>;
};
spi0_cs_pins {
brcm,pins = <0x8 0x7>;
phandle = <0xf>;
brcm,function = <0x1>;
};
mcp23017_pins {
brcm,pins = <0x4>;
brcm,function = <0x0>;
};
uart0_ctsrts_gpio16 {
brcm,pins = <0x10 0x11>;
phandle = <0x53>;
brcm,function = <0x7>;
};
gpclk2_gpio6 {
brcm,pins = <0x6>;
phandle = <0x3b>;
brcm,function = <0x4>;
};
sdhost_gpio48 {
brcm,pins = <0x30 0x31 0x32 0x33 0x34 0x35>;
phandle = <0xc>;
brcm,function = <0x4>;
};
bt_pins {
brcm,pins = <0x2b>;
phandle = <0xa>;
brcm,pull = <0x0>;
brcm,function = <0x4>;
};
emmc_gpio34 {
brcm,pins = <0x22 0x23 0x24 0x25 0x26 0x27>;
phandle = <0x35>;
brcm,pull = <0x0 0x2 0x2 0x2 0x2 0x2>;
brcm,function = <0x7>;
};
gpclk1_gpio44 {
brcm,pins = <0x2c>;
phandle = <0x3a>;
brcm,function = <0x4>;
};
uart1_gpio14 {
brcm,pins = <0xe 0xf>;
phandle = <0x58>;
brcm,function = <0x2>;
};
uart0_gpio36 {
brcm,pins = <0x24 0x25>;
phandle = <0x56>;
brcm,function = <0x6>;
};
sdio_pins {
brcm,pins = <0x22 0x23 0x24 0x25 0x26 0x27>;
phandle = <0x1a>;
brcm,pull = <0x0 0x2 0x2 0x2 0x2 0x2>;
brcm,function = <0x7>;
};
uart1_gpio32 {
brcm,pins = <0x20 0x21>;
phandle = <0x5a>;
brcm,function = <0x2>;
};
pwm0_gpio18 {
brcm,pins = <0x12>;
phandle = <0x48>;
brcm,function = <0x2>;
};
gpclk1_gpio42 {
brcm,pins = <0x2a>;
phandle = <0x39>;
brcm,function = <0x4>;
};
uart1_gpio40 {
brcm,pins = <0x28 0x29>;
phandle = <0x5c>;
brcm,function = <0x2>;
};
emmc_gpio22 {
brcm,pins = <0x16 0x17 0x18 0x19 0x1a 0x1b>;
phandle = <0x34>;
brcm,function = <0x7>;
};
};
pixelvalve@7e807000 {
compatible = "brcm,bcm2835-pixelvalve2";
status = "disabled";
interrupts = <0x2 0xa>;
phandle = <0x6b>;
reg = <0x7e807000 0x100>;
};
v3d@7ec00000 {
power-domains = <0x14 0xa>;
compatible = "brcm,vc4-v3d";
status = "disabled";
interrupts = <0x1 0xa>;
phandle = <0x6f>;
reg = <0x7ec00000 0x1000>;
};
gpu {
compatible = "brcm,bcm2835-vc4";
status = "disabled";
phandle = <0x70>;
};
mmc@7e300000 {
compatible = "brcm,bcm2835-mmc", "brcm,bcm2835-sdhci";
clocks = <0x8 0x1c>;
status = "okay";
interrupts = <0x2 0x1e>;
brcm,overclock-50 = <0x0>;
bus-width = <0x4>;
dma-names = "rx-tx";
phandle = <0x28>;
reg = <0x7e300000 0x100>;
pinctrl-0 = <0x1a>;
dmas = <0xb 0xb>;
non-removable;
pinctrl-names = "default";
};
arm-pmu {
compatible = "arm,cortex-a7-pmu";
interrupt-parent = <0x3>;
interrupts = <0x9>;
};
spi@7e204000 {
compatible = "brcm,bcm2835-spi";
clocks = <0x8 0x14>;
status = "okay";
#address-cells = <0x1>;
interrupts = <0x2 0x16>;
cs-gpios = <0x10 0x8 0x1 0x10 0x7 0x1>;
#size-cells = <0x0>;
dma-names = "tx", "rx";
phandle = <0x21>;
reg = <0x7e204000 0x1000>;
pinctrl-0 = <0xe 0xf>;
dmas = <0xb 0x6 0xb 0x7>;
pinctrl-names = "default";
spidev@1 {
compatible = "spidev";
#address-cells = <0x1>;
#size-cells = <0x0>;
phandle = <0x60>;
reg = <0x1>;
spi-max-frequency = <0x7735940>;
};
mcp3008@0 {
compatible = "mcp3008";
phandle = <0x7c>;
reg = <0x0>;
spi-max-frequency = <0x36ee80>;
};
spidev@0 {
compatible = "spidev";
status = "disabled";
#address-cells = <0x1>;
#size-cells = <0x0>;
phandle = <0x5f>;
reg = <0x0>;
spi-max-frequency = <0x7735940>;
};
};
vchiq {
compatible = "brcm,bcm2835-vchiq";
cache-line-size = <0x40>;
firmware = <0x7>;
interrupts = <0x0 0x2>;
phandle = <0x1d>;
reg = <0x7e00b840 0xf>;
};
i2c@7e804000 {
compatible = "brcm,bcm2835-i2c";
clocks = <0x8 0x14>;
status = "okay";
#address-cells = <0x1>;
interrupts = <0x2 0x15>;
size-cells = <0x0>;
#size-cells = <0x0>;
phandle = <0x23>;
reg = <0x7e804000 0x1000>;
clock-frequency = <0x186a0>;
pinctrl-0 = <0x15>;
pinctrl-names = "default";
mcp@20 {
compatible = "microchip,mcp23017";
gpio-controller;
status = "okay";
interrupt-parent = <0x10>;
interrupts = <0xc 0x2>;
microchip,irq-mirror;
reg = <0x20>;
#gpio-cells = <0x2>;
interrupt-cells = <0x2>;
interrupt-controller;
};
ads1015 {
compatible = "ti,ads1015";
status = "okay";
#address-cells = <0x1>;
#size-cells = <0x0>;
phandle = <0x8c>;
reg = <0x49>;
channel_a {
ti,datarate = <0x4>;
ti,gain = <0x2>;
phandle = <0x8d>;
reg = <0x4>;
};
};
mcp@21 {
compatible = "microchip,mcp23017";
gpio-controller;
status = "okay";
interrupt-parent = <0x10>;
interrupts = <0x19 0x2>;
microchip,irq-mirror;
reg = <0x21>;
#gpio-cells = <0x2>;
interrupt-cells = <0x2>;
interrupt-controller;
};
sc16is752@4d {
compatible = "nxp,sc16is752";
clocks = <0x84>;
gpio-controller;
status = "okay";
i2c-max-frequency = <0x61a80>;
interrupt-parent = <0x10>;
interrupts = <0x1f1 0x2>;
phandle = <0x85>;
reg = <0x4d>;
#gpio-cells = <0x0>;
clock-frequency = <0xbb8000>;
sc16is752_clk {
compatible = "fixed-clock";
#clock-cells = <0x0>;
phandle = <0x84>;
clock-frequency = <0xe10000>;
};
};
sgtl5000@0a {
VDDIO-supply = <0x78>;
compatible = "fsl,sgtl5000";
clocks = <0x7a>;
#sound-dai-cells = <0x0>;
VDDA-supply = <0x78>;
micbias-voltage-m-volts = <0xbb8>;
status = "okay";
micbias-resistor-k-ohms = <0x2>;
reg = <0xa>;
VDDD-supply = <0x7b>;
};
};
vcsm {
compatible = "raspberrypi,bcm2835-vcsm";
firmware = <0x7>;
status = "okay";
phandle = <0x74>;
};
audio {
brcm,pwm-channels = <0x8>;
compatible = "brcm,bcm2835-audio";
status = "disabled";
phandle = <0x24>;
pinctrl-0 = <0x1c>;
pinctrl-names = "default";
};
i2s@7e203000 {
compatible = "brcm,bcm2835-i2s";
clocks = <0x8 0x1f>;
#sound-dai-cells = <0x0>;
status = "okay";
dma-names = "tx", "rx";
phandle = <0x20>;
reg = <0x7e203000 0x24>;
pinctrl-0 = <0xd>;
dmas = <0xb 0x2 0xb 0x3>;
pinctrl-names = "default";
};
mailbox@7e00b880 {
compatible = "brcm,bcm2835-mbox";
#mbox-cells = <0x0>;
interrupts = <0x0 0x1>;
phandle = <0x1b>;
reg = <0x7e00b880 0x40>;
};
gpiomem {
compatible = "brcm,bcm2835-gpiomem";
reg = <0x7e200000 0x1000>;
};
vec@7e806000 {
compatible = "brcm,bcm2835-vec";
clocks = <0x8 0x18>;
status = "disabled";
interrupts = <0x2 0x1b>;
phandle = <0x6a>;
reg = <0x7e806000 0x1000>;
};
power {
compatible = "raspberrypi,bcm2835-power";
firmware = <0x7>;
phandle = <0x14>;
#power-domain-cells = <0x1>;
};
pixelvalve@7e206000 {
compatible = "brcm,bcm2835-pixelvalve0";
status = "disabled";
interrupts = <0x2 0xd>;
phandle = <0x61>;
reg = <0x7e206000 0x100>;
};
firmware {
compatible = "raspberrypi,bcm2835-firmware";
mboxes = <0x1b>;
phandle = <0x7>;
};
dsi@7e209000 {
compatible = "brcm,bcm2835-dsi0";
clocks = <0x8 0x20 0x8 0x2f 0x8 0x31>;
clock-names = "phy", "escape", "pixel";
#address-cells = <0x1>;
interrupts = <0x2 0x4>;
#size-cells = <0x0>;
#clock-cells = <0x1>;
phandle = <0x5>;
reg = <0x7e209000 0x78>;
clock-output-names = "dsi0_byte", "dsi0_ddr2", "dsi0_ddr";
};
fb {
compatible = "brcm,bcm2708-fb";
firmware = <0x7>;
status = "okay";
phandle = <0x73>;
};
local_intc@40000000 {
compatible = "brcm,bcm2836-l1-intc";
#interrupt-cells = <0x1>;
interrupt-parent = <0x3>;
phandle = <0x3>;
reg = <0x40000000 0x100>;
interrupt-controller;
};
virtgpio {
compatible = "brcm,bcm2835-virtgpio";
gpio-controller;
firmware = <0x7>;
status = "okay";
phandle = <0x30>;
#gpio-cells = <0x2>;
};
dpi@7e208000 {
compatible = "brcm,bcm2835-dpi";
clocks = <0x8 0x14 0x8 0x2c>;
clock-names = "core", "pixel";
status = "disabled";
#address-cells = <0x1>;
#size-cells = <0x0>;
phandle = <0x63>;
reg = <0x7e208000 0x8c>;
};
mmc@7e202000 {
compatible = "brcm,bcm2835-sdhost";
clocks = <0x8 0x14>;
brcm,pio-limit = <0x1>;
status = "okay";
interrupts = <0x2 0x18>;
brcm,overclock-50 = <0x0>;
bus-width = <0x4>;
dma-names = "rx-tx";
phandle = <0x27>;
reg = <0x7e202000 0x100>;
pinctrl-0 = <0xc>;
dmas = <0xb 0xd>;
pinctrl-names = "default";
};
expgpio {
compatible = "brcm,bcm2835-expgpio";
gpio-controller;
firmware = <0x7>;
status = "okay";
phandle = <0x17>;
#gpio-cells = <0x2>;
};
hdmi@7e902000 {
power-domains = <0x14 0x5>;
compatible = "brcm,bcm2835-hdmi";
clocks = <0x8 0x10 0x8 0x19>;
clock-names = "pixel", "hdmi";
ddc = <0x16>;
status = "disabled";
interrupts = <0x2 0x8 0x2 0x9>;
dma-names = "audio-rx";
phandle = <0x6c>;
hpd-gpios = <0x17 0x4 0x1>;
reg = <0x7e902000 0x600 0x7e808000 0x100>;
dmas = <0xb 0x11>;
};
pwm@7e20c000 {
compatible = "brcm,bcm2835-pwm";
clocks = <0x8 0x1e>;
status = "disabled";
assigned-clock-rates = <0x989680>;
assigned-clocks = <0x8 0x1e>;
phandle = <0x66>;
reg = <0x7e20c000 0x28>;
#pwm-cells = <0x2>;
};
watchdog@7e100000 {
compatible = "brcm,bcm2835-pm-wdt";
phandle = <0x25>;
reg = <0x7e100000 0x28>;
};
interrupt-controller@7e00b200 {
compatible = "brcm,bcm2836-armctrl-ic";
#interrupt-cells = <0x2>;
interrupt-parent = <0x3>;
interrupts = <0x8>;
phandle = <0x1>;
reg = <0x7e00b200 0x200>;
interrupt-controller;
};
dsi@7e700000 {
compatible = "brcm,bcm2835-dsi1";
clocks = <0x8 0x23 0x8 0x30 0x8 0x32>;
clock-names = "phy", "escape", "pixel";
status = "disabled";
#address-cells = <0x1>;
interrupts = <0x2 0xc>;
#size-cells = <0x0>;
#clock-cells = <0x1>;
phandle = <0x6>;
reg = <0x7e700000 0x8c>;
clock-output-names = "dsi1_byte", "dsi1_ddr2", "dsi1_ddr";
};
axiperf {
compatible = "brcm,bcm2835-axiperf";
firmware = <0x7>;
status = "disabled";
phandle = <0x29>;
reg = <0x7e009800 0x100 0x7ee08000 0x100>;
};
sound {
compatible = "fe-pi,fe-pi-audio";
i2s-controller = <0x20>;
status = "okay";
phandle = <0x75>;
};
i2c@7e205000 {
compatible = "brcm,bcm2835-i2c";
clocks = <0x8 0x14>;
status = "disabled";
#address-cells = <0x1>;
interrupts = <0x2 0x15>;
#size-cells = <0x0>;
phandle = <0x22>;
reg = <0x7e205000 0x1000>;
clock-frequency = <0x186a0>;
pinctrl-0 = <0x11>;
pinctrl-names = "default";
};
serial@7e215040 {
compatible = "brcm,bcm2835-aux-uart";
clocks = <0x12 0x0>;
status = "okay";
interrupt-parent = <0x12>;
interrupts = <0x0>;
phandle = <0x1f>;
reg = <0x7e215040 0x40>;
pinctrl-0 = <0x13>;
pinctrl-names = "default";
};
dma@7e007000 {
#dma-cells = <0x1>;
compatible = "brcm,bcm2835-dma";
brcm,dma-channel-mask = <0x7f34>;
interrupts = <0x1 0x10 0x1 0x11 0x1 0x12 0x1 0x13 0x1 0x14 0x1 0x15 0x1 0x16 0x1 0x17 0x1 0x18 0x1 0x19 0x1 0x1a 0x1 0x1b 0x1 0x1b 0x1 0x1b 0x1 0x1b 0x1 0x1c>;
phandle = <0xb>;
reg = <0x7e007000 0xf00>;
interrupt-names = "dma0", "dma1", "dma2", "dma3", "dma4", "dma5", "dma6", "dma7", "dma8", "dma9", "dma10", "dma11", "dma12", "dma13", "dma14", "dma-shared-all";
};
i2c@7e805000 {
compatible = "brcm,bcm2835-i2c";
clocks = <0x8 0x14>;
status = "disabled";
#address-cells = <0x1>;
interrupts = <0x2 0x15>;
#size-cells = <0x0>;
phandle = <0x16>;
reg = <0x7e805000 0x1000>;
clock-frequency = <0x186a0>;
};
spi@7e215080 {
compatible = "brcm,bcm2835-aux-spi";
clocks = <0x12 0x1>;
status = "disabled";
interrupt-parent = <0x12>;
#address-cells = <0x1>;
interrupts = <0x1>;
#size-cells = <0x0>;
phandle = <0x64>;
reg = <0x7e215080 0x40>;
};
aux@0x7e215000 {
compatible = "brcm,bcm2835-aux";
clocks = <0x8 0x14>;
#interrupt-cells = <0x1>;
interrupts = <0x1 0x1d>;
#clock-cells = <0x1>;
phandle = <0x12>;
reg = <0x7e215000 0x8>;
interrupt-controller;
};
firmwarekms@7e600000 {
compatible = "raspberrypi,rpi-firmware-kms";
status = "disabled";
interrupts = <0x2 0x10>;
brcm,firmware = <0x7>;
phandle = <0x71>;
reg = <0x7e600000 0x100>;
};
rng@7e104000 {
compatible = "brcm,bcm2835-rng";
interrupts = <0x2 0x1d>;
phandle = <0x26>;
reg = <0x7e104000 0x10>;
};
csi1@7e801000 {
power-domains = <0x14 0xd>;
compatible = "brcm,bcm2835-unicam";
clocks = <0x8 0x2e>;
clock-names = "lp";
status = "disabled";
#address-cells = <0x1>;
interrupts = <0x2 0x7>;
#size-cells = <0x0>;
#clock-cells = <0x1>;
phandle = <0x69>;
reg = <0x7e801000 0x800 0x7e802004 0x4>;
port {
endpoint {
data-lanes = <0x1 0x2>;
};
};
};
reg_1v8@0 {
compatible = "regulator-fixed";
phandle = <0x7b>;
regulator-min-microvolt = <0x1b7740>;
regulator-max-microvolt = <0x1b7740>;
regulator-always-on;
regulator-name = "1V8";
};
csi0@7e800000 {
power-domains = <0x14 0xc>;
compatible = "brcm,bcm2835-unicam";
clocks = <0x8 0x2d>;
clock-names = "lp";
status = "disabled";
#address-cells = <0x1>;
interrupts = <0x2 0x6>;
#size-cells = <0x0>;
#clock-cells = <0x1>;
phandle = <0x68>;
reg = <0x7e800000 0x800 0x7e802000 0x4>;
};
usb@7e980000 {
power-domains = <0x14 0x6>;
compatible = "brcm,bcm2708-usb";
clocks = <0x18>;
clock-names = "otg";
phy-names = "usb2-phy";
#address-cells = <0x1>;
interrupts = <0x2 0x0 0x1 0x9>;
#size-cells = <0x0>;
phandle = <0x6d>;
phys = <0x19>;
reg = <0x7e980000 0x10000 0x7e006000 0x1000>;
usb1@1 {
compatible = "usb424,9514";
#address-cells = <0x1>;
#size-cells = <0x0>;
reg = <0x1>;
usbether@1 {
compatible = "usb424,ec00";
local-mac-address = [b8 27 eb 86 d3 54];
phandle = <0x6e>;
reg = <0x1>;
};
};
};
smi@7e600000 {
compatible = "brcm,bcm2835-smi";
clocks = <0x8 0x2a>;
status = "disabled";
interrupts = <0x2 0x10>;
assigned-clock-rates = <0x7735940>;
dma-names = "rx-tx";
assigned-clocks = <0x8 0x2a>;
phandle = <0x72>;
reg = <0x7e600000 0x100>;
dmas = <0xb 0x4>;
};
spi@7e2150c0 {
compatible = "brcm,bcm2835-aux-spi";
clocks = <0x12 0x2>;
status = "disabled";
interrupt-parent = <0x12>;
#address-cells = <0x1>;
interrupts = <0x2>;
#size-cells = <0x0>;
phandle = <0x65>;
reg = <0x7e2150c0 0x40>;
};
};
leds {
compatible = "gpio-leds";
phandle = <0x79>;
act {
gpios = <0x30 0x0 0x0>;
label = "led0";
phandle = <0x2e>;
linux,default-trigger = "mmc0";
};
pwr {
gpios = <0x17 0x7 0x0>;
label = "led1";
phandle = <0x2f>;
linux,default-trigger = "input";
};
};
aliases {
intc = "/soc/interrupt-controller@7e00b200";
spi2 = "/soc/spi@7e2150c0";
i2c1 = "/soc/i2c@7e804000";
i2c_vc = "/soc/i2c@7e205000";
spi0 = "/soc/spi@7e204000";
thermal = "/soc/thermal@7e212000";
vchiq = "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/soc/vchiq";
sdhost = "/soc/mmc@7e202000";
aux = "/soc/aux@0x7e215000";
gpio = "/soc/gpio@7e200000";
mmc1 = "/soc/mmc@7e300000";
audio = "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/soc/audio";
dma = "/soc/dma@7e007000";
ethernet0 = "/soc/usb@7e980000/usb1@1/usbether@1";
soc = "/soc";
leds = "/leds";
mmc = "/soc/mmc@7e300000";
serial1 = "/soc/serial@7e201000";
i2c_arm = "/soc/i2c@7e804000";
uart0 = "/soc/serial@7e201000";
fb = "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/soc/fb";
i2c2 = "/soc/i2c@7e805000";
i2s = "/soc/i2s@7e203000";
spi1 = "/soc/spi@7e215080";
usb = "/soc/usb@7e980000";
i2c0 = "/soc/i2c@7e205000";
watchdog = "/soc/watchdog@7e100000";
axiperf = "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/soc/axiperf";
mmc0 = "/soc/mmc@7e202000";
sound = "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/soc/sound";
mailbox = "/soc/mailbox@7e00b880";
uart1 = "/soc/serial@7e215040";
random = "/soc/rng@7e104000";
i2c = "/soc/i2c@7e804000";
serial0 = "/soc/serial@7e215040";
};
chosen {
bootargs = "8250.nr_uarts=1 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=PARTUUID=96c96cf9-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait";
kaslr-seed = <0xd912424 0x7214b331>;
};
thermal-zones {
cpu-thermal {
thermal-sensors = <0x2>;
polling-delay = <0x3e8>;
polling-delay-passive = <0x0>;
coefficients = <0xfffffde6 0x64960>;
phandle = <0x31>;
cooling-maps {
};
};
};
timer {
compatible = "arm,armv7-timer";
always-on;
interrupt-parent = <0x3>;
interrupts = <0x0 0x1 0x3 0x2>;
};
memory {
device_type = "memory";
reg = <0x0 0x3b400000>;
};
phy {
compatible = "usb-nop-xceiv";
phandle = <0x19>;
#phy-cells = <0x0>;
};
fixedregulator_3v3 {
compatible = "regulator-fixed";
phandle = <0x78>;
regulator-min-microvolt = <0x325aa0>;
regulator-max-microvolt = <0x325aa0>;
regulator-always-on;
regulator-name = "3v3";
};
cpus {
enable-method = "brcm,bcm2836-smp";
#address-cells = <0x1>;
#size-cells = <0x0>;
phandle = <0x76>;
cpu@3 {
compatible = "arm,cortex-a53";
cpu-release-addr = <0x0 0xf0>;
device_type = "cpu";
enable-method = "spin-table";
phandle = <0x2d>;
reg = <0x3>;
clock-frequency = <0x47868c00>;
};
cpu@1 {
compatible = "arm,cortex-a53";
cpu-release-addr = <0x0 0xe0>;
device_type = "cpu";
enable-method = "spin-table";
phandle = <0x2b>;
reg = <0x1>;
clock-frequency = <0x47868c00>;
};
cpu@2 {
compatible = "arm,cortex-a53";
cpu-release-addr = <0x0 0xe8>;
device_type = "cpu";
enable-method = "spin-table";
phandle = <0x2c>;
reg = <0x2>;
clock-frequency = <0x47868c00>;
};
cpu@0 {
compatible = "arm,cortex-a53";
cpu-release-addr = <0x0 0xd8>;
device_type = "cpu";
enable-method = "spin-table";
phandle = <0x2a>;
reg = <0x0>;
clock-frequency = <0x47868c00>;
};
};
fixedregulator_5v0 {
compatible = "regulator-fixed";
phandle = <0x77>;
regulator-min-microvolt = <0x4c4b40>;
regulator-max-microvolt = <0x4c4b40>;
regulator-always-on;
regulator-name = "5v0";
};
axi {
vc_mem {
reg = <0x3ec00000 0x40000000 0xc0000000>;
};
};
};
Reviewing the clock-frequency variable, it can be observed these are not the same frequency which I believe may be causing the device to malfunction.
Expected behaviour
Unless I am misinterpriting the usage of this child block of code, the clock-frequency fields should agree.
Actual behaviour
The clocks do not match
System
Copy and paste the results of the raspinfo command in to this section. Alternatively, copy and paste a pastebin link, or add answers to the following questions:
The raspinfo command fails, so filling out the details manually.
-
Which model of Raspberry Pi?
Pi3b -
Which OS and version (
cat /etc/rpi-issue)?
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, e910bf55ac92e27c6e77043e8995bcb5e0a2d742, stage2 -
Which firmware version (
vcgencmd version)?
Mar 27 2019 15:45:53
Copyright (c) 2012 Broadcom
version 2e98b31d18547962e564bdf88e57b3df7085c29b (clean) (release) (start) -
Which kernel version (
uname -a)?
Linux openrepeater 4.14.98-v7+ Add FBUNSUPPORTED ioctl for bcm2708_fb #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux
Logs
If applicable, add the relevant output from dmesg or similar.
dmesg
note - I can't find where this error code is described so unable to debug it further
[ 5.466004] sc16is7xx: probe of 1-004d failed with error -22
vcdbg log msg
002345.680: brfs: File read: /mfs/sd/overlays/sc16is752-i2c.dtbo
002359.741: Loaded overlay 'sc16is752-i2c'
002359.796: dtparam: int_pin=497
002360.238: dtparam: addr=0x4D
002360.746: dtparam: xtal=12288000
Additional context
Add any other relevant context for the problem.
Activity
Dloranger commentedon Aug 17, 2019
Okay I am fairly certain there is 2 bugs in this overlay.
#1) Prior to making a hard coded change to the clock_frequency value in the DTS I was only getting gibberish, but on the expected cadence I am expecting. I have now hardcoded the actual frequency of my crystal, recompiled and rebooted. Now when I monitor the input, the signal is coming through perfectly as desired.
#2) When I use a native GPIO (24) everything works as expected with the change to bug 1, but leaving the fix in place and reverting back to my desired gpio on the expander, the driver fails to load the chipset and the ttySC0/1 are not created.
pelwell commentedon Aug 17, 2019
I can see one bug: the
xtalparameter is pointing at the wrong label - it should say:However, as far as the DT goes, the
int_pinparameter seems to do the right thing, so I'm puzzled as to why it isn't working.6by9 commentedon Aug 17, 2019
@pelwell correct me if I'm wrong, but the
int_pinparameter is changing the GPIO line within the GPIO controller specified byinterrupt-parent. That's set as&gpioand you're not changing it, therefore it is a native GPIO.https://github.com/raspberrypi/linux/blob/rpi-4.19.y/arch/arm/boot/dts/overlays/sc16is752-i2c-overlay.dts#L19
503 is the old sysfs style GPIO numbering for the line, whereas the kernel internally uses controller, and index on that controller.
If you want to change to using a GPIO expander on the I2C bus then
(a) that needs to be wired up for interrupts
(b) you need to change
interrupt-parentto point at that GPIO exapnder, and(c)
int_pinneeds to match the line on that controller that you wish to use.Dloranger commentedon Aug 17, 2019
pelwell commentedon Aug 17, 2019
It would have helped if I'd read all the words in your post, and not conflated it with a similar sounding interrupt issue on the Forums that is all native GPIO.
As @6by9 said, it is possible to use non-native GPIOs from an expander, but you would need a custom overlay to do so for a number of reasons:
Unless you take some special measures, labels in an applied overlay aren't made available to other overlays - they just disappear, leaving the phandles. This is good because it prevents overlays from unintentionally clashing, but it makes it harder to add shared resource via an overlay.
It isn't currently possible to pass a label name as a parameter to an overlay, so the labels for any GPIO controllers you might want to use would have to appear in the pre-built overlay.
The combination of those factors means that a custom overlay is probably the best way to go. Note that there is a utility, ovmerge, that can combine overlays to make a new one, renumbering fragments and allowing you to refer to labels between the constituent overlays. Because ovmerge manipulates the source code rather than compiling and decompiling, the end result is quite readable. It is currently used to maintain the upstream overlay.
Dloranger commentedon Aug 17, 2019
I will have a look at the ovmerge tool to streamline other overlays I am working on. I frequently have to merge overlays to get multiple devices of the same type working together, example mcp23017.
I am okay with using the native gpio pin for now, I only have a few native gpio consumed and I expose several more through the expanders.
I was not 100% clear on which line to make the applicable change to the xtal = .... above. Will you be updating the source with the correction? If so I will issue a "sed" command to reflect the code change in my scripts to fix the code until it hits mainline. Right now I have it decompiling, fixing the hardcode and recompiling the dtbo which works, but obviously is not the best way to do it.
overlays: sc16ic752-i2c: Fix xtal parameter
pelwell commentedon Aug 17, 2019
The patch is in the rpi-4.19.y now.
kernel: Bump to 4.19.67
kernel: Bump to 4.19.67
Dloranger commentedon Aug 31, 2019
I think something may still be broken. I copied the entire file from the updated dts and recompiled it using dtc
and use the following to instantiate the device (note I updated the clock frequency from before to one more suitable to UART @ 115200, this should yield a perfect divisor and prescalar result in the registers of the chip)
dtoverlay=sc16is752-i2c,int_pin=24,addr=0x4D,xtal=3686400when rebooting I get the following (which appears to be ignoring the address update since it says its looking at 0x48
any ideas?
Dloranger commentedon Aug 31, 2019
just to be sure, I also moved my crystal input pin back to the 12.288MHz and it still responds the same way. its possible its a soldering issue as I had to lift the pin, but I see the crystal making it into the pin at least and no obvious soldering defects when looking under magnification.
I will try a second board when I get a chance just to confirm I haven't damaged the chip somehow.
6by9 commentedon Aug 31, 2019
Your kernel log says
0x48 there, but you're dtoverlay line supposedly changed the address to 0x4D. I think there's something still wrong in your overlay.
The change is merged into the kernel image, therefore please use rpi-update to update a non-critical Pi to use this updated image, and report back. Sorry, but it's nearly impossible to predict what has gone wrong with your rebuilt dt files.
Dloranger commentedon Aug 31, 2019
Dloranger commentedon Sep 5, 2019
Everything is working when I got an image up to buster and used the precompiled DTBO files
55 remaining items
overlays: sc16ic750-i2c: Fix xtal parameter
overlays: sc16ic750-i2c: Fix xtal parameter
overlays: sc16ic750-i2c: Fix xtal parameter
overlays: sc16ic750-i2c: Fix xtal parameter
overlays: sc16ic750-i2c: Fix xtal parameter
overlays: sc16ic750-i2c: Fix xtal parameter
overlays: sc16ic750-i2c: Fix xtal parameter
overlays: sc16ic750-i2c: Fix xtal parameter
overlays: sc16ic750-i2c: Fix xtal parameter
overlays: sc16ic750-i2c: Fix xtal parameter
overlays: sc16ic750-i2c: Fix xtal parameter
overlays: sc16ic750-i2c: Fix xtal parameter
overlays: sc16ic750-i2c: Fix xtal parameter
overlays: sc16ic750-i2c: Fix xtal parameter
overlays: sc16ic750-i2c: Fix xtal parameter