/dts-v1/; /plugin/; / { compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709", "brcm,bcm2711"; fragment@0 { target = <&gpio>; __overlay__ { picade_pins: picade_pins { brcm,pins = <17 5 6 8 9 10 11 12 16 20 22 23 24 25 27>; brcm,function = <0 0 0 0 0 0 0 0 0 0 0 0 0 0 0>; brcm,pull = <2 2 2 2 2 2 2 2 2 2 2 2 2 2 2>; }; power_ctrl_pins: power_ctrl_pins { brcm,pins = <4>; brcm,function = <1>; }; i2s_pins: i2s_pins { /* We cannot share BCM 20 between gpio keys (Left) and i2s (PCM_DIN) Assign PCM_DIN to GPIO 26, which is unused by Picade HAT X. */ brcm,pins = <18 19 26 21>; brcm,function = <4 4 4 4>; }; }; }; fragment@1 { target-path = "/"; __overlay__ { power_ctrl: power_ctrl { compatible = "gpio-poweroff"; gpios = <&gpio 4 1>; force; }; }; }; fragment@2 { target-path = "/"; __overlay__ { gpio_keys: gpio_keys { compatible = "gpio-keys"; pinctrl-names = "default"; pinctrl-0 = <&picade_pins>; status = "okay"; up: up { label = "Up"; linux,code = <103>; gpios = <&gpio 12 1>; }; down: down { label = "Down"; linux,code = <108>; gpios = <&gpio 6 1>; }; left: left { label = "Left"; linux,code = <105>; gpios = <&gpio 20 1>; }; right: right { label = "Right"; linux,code = <106>; gpios = <&gpio 16 1>; }; button1: button1 { label = "Button 1"; linux,code = <29>; gpios = <&gpio 5 1>; }; button2: button2 { label = "Button 2"; linux,code = <56>; gpios = <&gpio 11 1>; }; button3: button3 { label = "Button 3"; linux,code = <57>; gpios = <&gpio 8 1>; }; button4: button4 { label = "Button 4"; linux,code = <42>; gpios = <&gpio 25 1>; }; button5: button5 { label = "Button 5"; linux,code = <44>; gpios = <&gpio 9 1>; }; button6: button6 { label = "Button 6"; linux,code = <45>; gpios = <&gpio 10 1>; }; enter: enter { label = "Enter"; linux,code = <28>; gpios = <&gpio 27 1>; }; escape: escape { label = "Escape"; linux,code = <1>; gpios = <&gpio 22 1>; }; coin: coin { label = "Coin"; linux,code = <23>; gpios = <&gpio 23 1>; }; start: start { label = "Start"; linux,code = <24>; gpios = <&gpio 24 1>; }; power: power { label = "Power"; linux,code = <116>; // KEY_POWER gpios = <&gpio 17 1>; }; }; }; }; fragment@3 { target = <&i2s>; __overlay__ { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&i2s_pins>; }; }; fragment@4 { target-path = "/"; __overlay__ { pcm5102a-codec { #sound-dai-cells = <0>; compatible = "ti,pcm5102a"; status = "okay"; }; }; }; fragment@5 { target = <&sound>; __overlay__ { compatible = "hifiberry,hifiberry-dac"; i2s-controller = <&i2s>; status = "okay"; }; }; fragment@6 { target-path = "/"; __overlay__ { act_led: act_led { compatible = "gpio-leds"; gpios = <&gpio 13 1>; linux,default-trigger = "default-on"; }; }; }; __overrides__ { up = <&up>,"linux,code:0"; down = <&down>,"linux,code:0"; left = <&left>,"linux,code:0"; right = <&right>,"linux,code:0"; button1 = <&button1>,"linux,code:0"; button2 = <&button2>,"linux,code:0"; button3 = <&button3>,"linux,code:0"; button4 = <&button4>,"linux,code:0"; button5 = <&button5>,"linux,code:0"; button6 = <&button6>,"linux,code:0"; enter = <&enter>,"linux,code:0"; escape = <&escape>,"linux,code:0"; coin = <&coin>,"linux,code:0"; start = <&start>,"linux,code:0"; led-trigger = <&act_led>,"linux,default-trigger"; noaudio = <0>,"-3-4-5"; noactled = <0>,"-6"; nopoweroff = <0>,"-1"; }; };