| .. | .. |
|---|
| 8 | 8 | /dts-v1/; |
|---|
| 9 | 9 | #include "r7s72100.dtsi" |
|---|
| 10 | 10 | #include <dt-bindings/gpio/gpio.h> |
|---|
| 11 | +#include <dt-bindings/input/input.h> |
|---|
| 11 | 12 | #include <dt-bindings/pinctrl/r7s72100-pinctrl.h> |
|---|
| 12 | 13 | |
|---|
| 13 | 14 | / { |
|---|
| .. | .. |
|---|
| 28 | 29 | reg = <0x08000000 0x02000000>; |
|---|
| 29 | 30 | }; |
|---|
| 30 | 31 | |
|---|
| 32 | + keyboard { |
|---|
| 33 | + compatible = "gpio-keys"; |
|---|
| 34 | + |
|---|
| 35 | + pinctrl-names = "default"; |
|---|
| 36 | + pinctrl-0 = <&keyboard_pins>; |
|---|
| 37 | + |
|---|
| 38 | + key-1 { |
|---|
| 39 | + interrupt-parent = <&irqc>; |
|---|
| 40 | + interrupts = <3 IRQ_TYPE_EDGE_BOTH>; |
|---|
| 41 | + linux,code = <KEY_1>; |
|---|
| 42 | + label = "SW1"; |
|---|
| 43 | + wakeup-source; |
|---|
| 44 | + }; |
|---|
| 45 | + |
|---|
| 46 | + key-2 { |
|---|
| 47 | + interrupt-parent = <&irqc>; |
|---|
| 48 | + interrupts = <2 IRQ_TYPE_EDGE_BOTH>; |
|---|
| 49 | + linux,code = <KEY_2>; |
|---|
| 50 | + label = "SW2"; |
|---|
| 51 | + wakeup-source; |
|---|
| 52 | + }; |
|---|
| 53 | + |
|---|
| 54 | + key-3 { |
|---|
| 55 | + interrupt-parent = <&irqc>; |
|---|
| 56 | + interrupts = <5 IRQ_TYPE_EDGE_BOTH>; |
|---|
| 57 | + linux,code = <KEY_3>; |
|---|
| 58 | + label = "SW3"; |
|---|
| 59 | + wakeup-source; |
|---|
| 60 | + }; |
|---|
| 61 | + }; |
|---|
| 62 | + |
|---|
| 31 | 63 | lbsc { |
|---|
| 32 | 64 | #address-cells = <1>; |
|---|
| 33 | 65 | #size-cells = <1>; |
|---|
| 34 | 66 | }; |
|---|
| 35 | 67 | |
|---|
| 36 | 68 | leds { |
|---|
| 37 | | - status = "okay"; |
|---|
| 38 | 69 | compatible = "gpio-leds"; |
|---|
| 39 | 70 | |
|---|
| 40 | 71 | led0 { |
|---|
| 41 | 72 | gpios = <&port7 1 GPIO_ACTIVE_LOW>; |
|---|
| 73 | + }; |
|---|
| 74 | + |
|---|
| 75 | + led1 { |
|---|
| 76 | + gpios = <&io_expander1 0 GPIO_ACTIVE_LOW>; |
|---|
| 77 | + }; |
|---|
| 78 | + |
|---|
| 79 | + led2 { |
|---|
| 80 | + gpios = <&io_expander1 1 GPIO_ACTIVE_LOW>; |
|---|
| 81 | + }; |
|---|
| 82 | + |
|---|
| 83 | + led3 { |
|---|
| 84 | + gpios = <&io_expander1 2 GPIO_ACTIVE_LOW>; |
|---|
| 42 | 85 | }; |
|---|
| 43 | 86 | }; |
|---|
| 44 | 87 | }; |
|---|
| 45 | 88 | |
|---|
| 46 | 89 | &extal_clk { |
|---|
| 47 | 90 | clock-frequency = <13330000>; |
|---|
| 91 | +}; |
|---|
| 92 | + |
|---|
| 93 | +&i2c3 { |
|---|
| 94 | + pinctrl-names = "default"; |
|---|
| 95 | + pinctrl-0 = <&i2c3_pins>; |
|---|
| 96 | + status = "okay"; |
|---|
| 97 | + |
|---|
| 98 | + clock-frequency = <400000>; |
|---|
| 99 | + |
|---|
| 100 | + io_expander1: gpio@20 { |
|---|
| 101 | + compatible = "onnn,cat9554"; |
|---|
| 102 | + reg = <0x20>; |
|---|
| 103 | + gpio-controller; |
|---|
| 104 | + #gpio-cells = <2>; |
|---|
| 105 | + }; |
|---|
| 106 | + |
|---|
| 107 | + io_expander2: gpio@21 { |
|---|
| 108 | + compatible = "onnn,cat9554"; |
|---|
| 109 | + reg = <0x21>; |
|---|
| 110 | + gpio-controller; |
|---|
| 111 | + #gpio-cells = <2>; |
|---|
| 112 | + }; |
|---|
| 113 | + |
|---|
| 114 | + eeprom@50 { |
|---|
| 115 | + compatible = "renesas,r1ex24016", "atmel,24c16"; |
|---|
| 116 | + reg = <0x50>; |
|---|
| 117 | + pagesize = <16>; |
|---|
| 118 | + }; |
|---|
| 48 | 119 | }; |
|---|
| 49 | 120 | |
|---|
| 50 | 121 | &usb_x1_clk { |
|---|
| .. | .. |
|---|
| 56 | 127 | }; |
|---|
| 57 | 128 | |
|---|
| 58 | 129 | &pinctrl { |
|---|
| 130 | + /* RIIC ch3 (Port Expander, EEPROM (MAC Addr), Audio Codec) */ |
|---|
| 131 | + i2c3_pins: i2c3 { |
|---|
| 132 | + pinmux = <RZA1_PINMUX(1, 6, 1)>, /* RIIC3SCL */ |
|---|
| 133 | + <RZA1_PINMUX(1, 7, 1)>; /* RIIC3SDA */ |
|---|
| 134 | + }; |
|---|
| 135 | + |
|---|
| 136 | + keyboard_pins: keyboard { |
|---|
| 137 | + pinmux = <RZA1_PINMUX(1, 9, 3)>, /* IRQ3 */ |
|---|
| 138 | + <RZA1_PINMUX(1, 8, 3)>, /* IRQ2 */ |
|---|
| 139 | + <RZA1_PINMUX(1, 11, 3)>; /* IRQ5 */ |
|---|
| 140 | + }; |
|---|
| 59 | 141 | |
|---|
| 60 | 142 | /* Serial Console */ |
|---|
| 61 | 143 | scif2_pins: serial2 { |
|---|