| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- /*
- * Device tree overlay for the radio front panel on an Allwinner board.
- *
- * Plain numbers instead of #include, so it also works with armbian-add-overlay.
- *
- * TO CHECK against the actual board before use:
- * - root compatible, and the i2c bus in fragment@0 (i2c0)
- * - the U2 INT line: placeholder PA6 (<0 6 ...> = bank A, pin 6)
- *
- * U1 (0x74) is left to the s1d13700-tca driver and must not bind to pca953x.
- * For the i2c-dev frontend, remove the panel@74 node.
- */
- /dts-v1/;
- /plugin/;
- / {
- compatible = "allwinner,sun8i-h3";
- fragment@0 {
- target = <&i2c0>;
- __overlay__ {
- #address-cells = <1>;
- #size-cells = <0>;
- clock-frequency = <400000>;
- status = "okay";
- panel@74 {
- compatible = "k4be,s1d13700-tca9539";
- reg = <0x74>;
- };
- radio_u2: gpio@75 {
- compatible = "ti,tca9539";
- reg = <0x75>;
- gpio-controller;
- #gpio-cells = <2>;
- interrupt-controller;
- #interrupt-cells = <2>;
- interrupt-parent = <&pio>;
- interrupts = <0 6 8>; /* PA6, level low: PLACEHOLDER */
- };
- };
- };
- fragment@1 {
- target-path = "/";
- __overlay__ {
- /*
- * Keys are active low and read directly: one pin each, with
- * a 10k pull-up (the TCA9539 has none). Pins 0-7 are P0.0-7,
- * pins 8-15 are P1.0-7. Flag 1 = GPIO_ACTIVE_LOW.
- */
- radio-keys {
- compatible = "gpio-keys";
- autorepeat;
- esc { label = "esc"; gpios = <&radio_u2 0 1>; linux,code = <1>; debounce-interval = <20>; };
- next { label = "next"; gpios = <&radio_u2 1 1>; linux,code = <163>; debounce-interval = <20>; };
- stop { label = "stop"; gpios = <&radio_u2 2 1>; linux,code = <166>; debounce-interval = <20>; };
- menu { label = "menu"; gpios = <&radio_u2 3 1>; linux,code = <139>; debounce-interval = <20>; };
- list { label = "list"; gpios = <&radio_u2 4 1>; linux,code = <395>; debounce-interval = <20>; };
- up { label = "up"; gpios = <&radio_u2 5 1>; linux,code = <103>; debounce-interval = <20>; };
- prev { label = "prev"; gpios = <&radio_u2 6 1>; linux,code = <165>; debounce-interval = <20>; };
- right { label = "right"; gpios = <&radio_u2 7 1>; linux,code = <106>; debounce-interval = <20>; };
- down { label = "down"; gpios = <&radio_u2 8 1>; linux,code = <108>; debounce-interval = <20>; };
- pause { label = "pause"; gpios = <&radio_u2 9 1>; linux,code = <201>; debounce-interval = <20>; };
- ok { label = "ok"; gpios = <&radio_u2 10 1>; linux,code = <352>; debounce-interval = <20>; };
- left { label = "left"; gpios = <&radio_u2 11 1>; linux,code = <105>; debounce-interval = <20>; };
- play { label = "play"; gpios = <&radio_u2 12 1>; linux,code = <200>; debounce-interval = <20>; };
- };
- radio-backlight {
- compatible = "gpio-backlight";
- gpios = <&radio_u2 13 0>; /* P1.5, active high */
- default-on;
- };
- };
- };
- };
|