Port-arm archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Help with device tree overlays on RPI
> On Dec 11, 2018, at 4:37 AM, Nick Hudson <nick.hudson%gmx.co.uk@localhost> wrote:
>
> On 10/12/2018 02:19, Jason Thorpe wrote:
>> So, on my system, things seem to work better if I don't use target = <&i2c1>, but rather specify target-path = "/soc/i2c@..."
>> Is this a deficiency in our dtc(1)?
>
> No idea, but there are quite a few changes in 1.4.7 compared to our 1.4.4.
Actually, it seems like the biggest problem is that the "bcm2835-rpi-b-plus.dtb" on my /boot partition doesn't appear to have the symbol table for resolving &-references in the overlay. Replacing those with ones build locally got the additions to the I2C bus to work:
00002ce4: /i2c@7e804000
00002ddc: /rtc@68
00002e18: /light-sensor@39
nixie-dev:thorpej 3$ ofctl -p /soc/i2c@7e804000/rtc@68
[Caching 113 nodes and 770 properties]
compatible 64616c6c 61732c64 73333233 3100.... "dallas,ds3231"
name 72746300 ........ ........ ........ "rtc"
reg 00000068 ........ ........ ........ ...h
nixie-dev:thorpej 4$
nixie-dev:thorpej 5$ ofctl -p /soc/i2c@7e804000/light-sensor@39
[Caching 113 nodes and 770 properties]
compatible 616d7374 616f732c 74736c32 35363100 "amstaos,tsl2561"
name 6c696768 742d7365 6e736f72 00...... "light-sensor"
reg 00000039 ........ ........ ........ ...9
nixie-dev:thorpej 6$
[ 1.000000] dsrtc0 at iic2 addr 0x68: DS3231 Real-time Clock
[ 1.000000] tsllux0 at iic2 addr 0x39: TSL256x Light-to-Digital converter
nixie-dev:thorpej 8$ envstat
Current CritMax WarnMax WarnMin CritMin Unit
[dsrtc0]
temperature: 20.750 degC
[tsllux0]
ambient light: 73 lux
[vcmbox0]
temperature: 35.242 85.000 degC
nixie-dev:thorpej 9$
...so that's all good.
What still isn't working, however, are the nodes I'm trying to add directly... specifically, a gpio-keys node. Here's how it de-compiles from my overlay blob:
nixie-clock-control-pins {
brcm,pins = <0x0 0x2 0x3 0x4 0x5 0x6 0x19 0x1b>;
brcm,function = <0x0>;
brcm,pull = <0x2>;
linux,phandle = <0x1>;
phandle = <0x1>;
};
nixie-clock-controls {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <0x1>;
up-button {
label = "up";
linux,code = <0x67>;
gpios = <0xffffffff 0x0 0x1>;
};
down-button {
label = "down";
linux,code = <0x6c>;
gpios = <0xffffffff 0x2 0x1>;
};
enter-button {
label = "enter";
linux,code = <0x1c>;
gpios = <0xffffffff 0x3 0x1>;
};
snooze-button {
label = "snooze";
linux,code = <0x1f>;
gpios = <0xffffffff 0x4 0x1>;
};
alarm-set-button {
label = "alarm-set";
linux,code = <0x167>;
gpios = <0xffffffff 0x5 0x1>;
};
awake-button {
label = "awake";
linux,code = <0x71>;
gpios = <0xffffffff 0x6 0x1>;
};
alarm-enable-switch {
label = "alarm-on-off";
linux,code = <0x1e>;
gpios = <0xffffffff 0x1b 0x1>;
};
setup-mode-switch {
label = "setup-mode";
linux,code = <0x8d>;
gpios = <0xffffffff 0x19 0x1>;
};
};
__symbols__ {
nixie_clock_control_pins = "/nixie-clock-control-pins";
};
__fixups__ {
i2c1 = "/fragment@0:target:0";
gpio = "/nixie-clock-controls/up-button:gpios:0", "/nixie-clock-controls/down-button:gpios:0", "/nixie-clock-controls/enter-button:gpios:0", "/nixie-clock-controls/snooze-button:gpios:0", "/nixie-clock-controls/alarm-set-button:gpios:0", "/nixie-clock-controls/awake-button:gpios:0", "/nixie-clock-controls/alarm-enable-switch:gpios:0", "/nixie-clock-controls/setup-mode-switch:gpios:0";
};
__local_fixups__ {
nixie-clock-controls {
pinctrl-0 = <0x0>;
};
};
I'm not seeing "nixie-clock-control-pins" or "nixie-clock-controls" inserted into the tree at all.
>
> Try it maybe?
>
> Nick
-- thorpej
Home |
Main Index |
Thread Index |
Old Index