|
| 1 | +/* |
| 2 | + * Pimidi Linux kernel module. |
| 3 | + * Copyright (C) 2017-2024 Vilniaus Blokas UAB, https://blokas.io/ |
| 4 | + * |
| 5 | + * This program is free software; you can redistribute it and/or |
| 6 | + * modify it under the terms of the GNU General Public License |
| 7 | + * as published by the Free Software Foundation; version 2 of the |
| 8 | + * License. |
| 9 | + * |
| 10 | + * This program is distributed in the hope that it will be useful, |
| 11 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | + * GNU General Public License for more details. |
| 14 | + * |
| 15 | + * You should have received a copy of the GNU General Public License |
| 16 | + * along with this program; if not, write to the Free Software |
| 17 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
| 18 | + * MA 02110-1301, USA. |
| 19 | + */ |
| 20 | + |
| 21 | +/dts-v1/; |
| 22 | +/plugin/; |
| 23 | + |
| 24 | +#include <dt-bindings/gpio/gpio.h> |
| 25 | +#include <dt-bindings/interrupt-controller/irq.h> |
| 26 | + |
| 27 | +/ { |
| 28 | + compatible = "brcm,bcm2708"; |
| 29 | + |
| 30 | + fragment@0 { |
| 31 | + target = <&i2c_arm>; |
| 32 | + __overlay__ { |
| 33 | + status = "okay"; |
| 34 | + clock-frequency=<1000000>; |
| 35 | + |
| 36 | + pimidi_ctrl: pimidi_ctrl@20 { |
| 37 | + compatible = "blokaslabs,pimidi"; |
| 38 | + |
| 39 | + reg = <0x20>; |
| 40 | + status = "okay"; |
| 41 | + |
| 42 | + interrupt-parent = <&gpio>; |
| 43 | + interrupts = <23 IRQ_TYPE_LEVEL_LOW>; |
| 44 | + interrupt-names = "data_ready"; |
| 45 | + interrupt-controller; |
| 46 | + #interrupt-cells = <2>; |
| 47 | + |
| 48 | + data-ready-gpios = <&gpio 23 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; |
| 49 | + reset-gpios = <&gpio 22 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; |
| 50 | + }; |
| 51 | + }; |
| 52 | + }; |
| 53 | + |
| 54 | + __overrides__ { |
| 55 | + sel = <&pimidi_ctrl>,"reg:0{0=0x20,1=0x21,2=0x22,3=0x23}", |
| 56 | + <&pimidi_ctrl>,"data-ready-gpios:4{0=23,1=5,2=6,3=27}", |
| 57 | + <&pimidi_ctrl>,"interrupts:0{0=23,1=5,2=6,3=27}"; |
| 58 | + }; |
| 59 | +}; |
0 commit comments