1// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2/* 3 * Device Tree Source for the RZ SMARC Carrier-II Board. 4 * 5 * Copyright (C) 2023 Renesas Electronics Corp. 6 */ 7 8#include <dt-bindings/gpio/gpio.h> 9#include <dt-bindings/input/input.h> 10#include <dt-bindings/pinctrl/rzg2l-pinctrl.h> 11 12/ { 13 aliases { 14 i2c0 = &i2c0; 15 serial0 = &scif0; 16 mmc1 = &sdhi1; 17 }; 18 19 keys { 20 compatible = "gpio-keys"; 21 22 key-1 { 23 interrupts = <RZG2L_GPIO(18, 0) IRQ_TYPE_EDGE_FALLING>; 24 interrupt-parent = <&pinctrl>; 25 linux,code = <KEY_1>; 26 label = "USER_SW1"; 27 wakeup-source; 28 debounce-interval = <20>; 29 }; 30 31 key-2 { 32 interrupts = <RZG2L_GPIO(0, 1) IRQ_TYPE_EDGE_FALLING>; 33 interrupt-parent = <&pinctrl>; 34 linux,code = <KEY_2>; 35 label = "USER_SW2"; 36 wakeup-source; 37 debounce-interval = <20>; 38 }; 39 40 key-3 { 41 interrupts = <RZG2L_GPIO(0, 3) IRQ_TYPE_EDGE_FALLING>; 42 interrupt-parent = <&pinctrl>; 43 linux,code = <KEY_3>; 44 label = "USER_SW3"; 45 wakeup-source; 46 debounce-interval = <20>; 47 }; 48 }; 49 50 vcc_sdhi1: regulator-vcc-sdhi1 { 51 compatible = "regulator-fixed"; 52 regulator-name = "SDHI1 Vcc"; 53 regulator-min-microvolt = <3300000>; 54 regulator-max-microvolt = <3300000>; 55 gpios = <&pinctrl RZG2L_GPIO(2, 3) GPIO_ACTIVE_HIGH>; 56 enable-active-high; 57 }; 58 59 vccq_sdhi1: regulator-vccq-sdhi1 { 60 compatible = "regulator-gpio"; 61 regulator-name = "SDHI1 VccQ"; 62 regulator-min-microvolt = <1800000>; 63 regulator-max-microvolt = <3300000>; 64 gpios = <&pinctrl RZG2L_GPIO(4, 2) GPIO_ACTIVE_HIGH>; 65 gpios-states = <1>; 66 states = <3300000 1>, <1800000 0>; 67 }; 68}; 69 70&i2c0 { 71 status = "okay"; 72 73 clock-frequency = <1000000>; 74}; 75 76&pinctrl { 77 key-1-gpio-hog { 78 gpio-hog; 79 gpios = <RZG2L_GPIO(18, 0) GPIO_ACTIVE_LOW>; 80 input; 81 line-name = "key-1-gpio-irq"; 82 }; 83 84 key-2-gpio-hog { 85 gpio-hog; 86 gpios = <RZG2L_GPIO(0, 1) GPIO_ACTIVE_LOW>; 87 input; 88 line-name = "key-2-gpio-irq"; 89 }; 90 91 key-3-gpio-hog { 92 gpio-hog; 93 gpios = <RZG2L_GPIO(0, 3) GPIO_ACTIVE_LOW>; 94 input; 95 line-name = "key-3-gpio-irq"; 96 }; 97 98 scif0_pins: scif0 { 99 pinmux = <RZG2L_PORT_PINMUX(6, 3, 1)>, /* RXD */ 100 <RZG2L_PORT_PINMUX(6, 4, 1)>; /* TXD */ 101 }; 102 103 sdhi1_pins: sd1 { 104 data { 105 pins = "SD1_DATA0", "SD1_DATA1", "SD1_DATA2", "SD1_DATA3"; 106 power-source = <3300>; 107 }; 108 109 ctrl { 110 pins = "SD1_CLK", "SD1_CMD"; 111 power-source = <3300>; 112 }; 113 114 cd { 115 pinmux = <RZG2L_PORT_PINMUX(0, 2, 1)>; /* SD1_CD */ 116 }; 117 }; 118 119 sdhi1_pins_uhs: sd1-uhs { 120 data { 121 pins = "SD1_DATA0", "SD1_DATA1", "SD1_DATA2", "SD1_DATA3"; 122 power-source = <1800>; 123 }; 124 125 ctrl { 126 pins = "SD1_CLK", "SD1_CMD"; 127 power-source = <1800>; 128 }; 129 130 cd { 131 pinmux = <RZG2L_PORT_PINMUX(0, 2, 1)>; /* SD1_CD */ 132 }; 133 }; 134}; 135 136&scif0 { 137 pinctrl-names = "default"; 138 pinctrl-0 = <&scif0_pins>; 139 status = "okay"; 140}; 141 142&sdhi1 { 143 pinctrl-0 = <&sdhi1_pins>; 144 pinctrl-1 = <&sdhi1_pins_uhs>; 145 pinctrl-names = "default", "state_uhs"; 146 vmmc-supply = <&vcc_sdhi1>; 147 vqmmc-supply = <&vccq_sdhi1>; 148 bus-width = <4>; 149 sd-uhs-sdr50; 150 sd-uhs-sdr104; 151 max-frequency = <125000000>; 152 status = "okay"; 153}; 154