0001 // SPDX-License-Identifier: GPL-2.0-only
0002 /*
0003 * Copyright (C) 2015 Microchip Technology Inc. All rights reserved.
0004 */
0005
0006 /dts-v1/;
0007
0008 #include <dt-bindings/gpio/gpio.h>
0009 #include <dt-bindings/interrupt-controller/irq.h>
0010
0011 #include "pic32mzda.dtsi"
0012
0013 / {
0014 compatible = "microchip,pic32mzda-sk", "microchip,pic32mzda";
0015 model = "Microchip PIC32MZDA Starter Kit";
0016
0017 memory {
0018 device_type = "memory";
0019 reg = <0x08000000 0x08000000>;
0020 };
0021
0022 chosen {
0023 bootargs = "earlyprintk=ttyPIC1,115200n8r console=ttyPIC1,115200n8";
0024 };
0025
0026 leds0 {
0027 compatible = "gpio-leds";
0028 pinctrl-names = "default";
0029 pinctrl-0 = <&user_leds_s0>;
0030
0031 led@1 {
0032 label = "pic32mzda_sk:red:led1";
0033 gpios = <&gpio7 0 GPIO_ACTIVE_HIGH>;
0034 linux,default-trigger = "heartbeat";
0035 };
0036
0037 led@2 {
0038 label = "pic32mzda_sk:yellow:led2";
0039 gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>;
0040 linux,default-trigger = "mmc0";
0041 };
0042
0043 led@3 {
0044 label = "pic32mzda_sk:green:led3";
0045 gpios = <&gpio7 2 GPIO_ACTIVE_HIGH>;
0046 default-state = "on";
0047 };
0048 };
0049
0050 keys0 {
0051 compatible = "gpio-keys";
0052 pinctrl-0 = <&user_buttons_s0>;
0053 pinctrl-names = "default";
0054
0055 button-1 {
0056 label = "ESC";
0057 linux,code = <1>;
0058 gpios = <&gpio1 12 0>;
0059 };
0060
0061 button-2 {
0062 label = "Home";
0063 linux,code = <102>;
0064 gpios = <&gpio1 13 0>;
0065 };
0066
0067 button-3 {
0068 label = "Menu";
0069 linux,code = <139>;
0070 gpios = <&gpio1 14 0>;
0071 };
0072 };
0073 };
0074
0075 &uart2 {
0076 pinctrl-names = "default";
0077 pinctrl-0 = <&pinctrl_uart2>;
0078 status = "okay";
0079 };
0080
0081 &uart4 {
0082 pinctrl-names = "default";
0083 pinctrl-0 = <&pinctrl_uart4>;
0084 status = "okay";
0085 };
0086
0087 &sdhci {
0088 pinctrl-names = "default";
0089 pinctrl-0 = <&pinctrl_sdhc1>;
0090 status = "okay";
0091 assigned-clocks = <&rootclk REF2CLK>, <&rootclk REF4CLK>,
0092 <&rootclk REF5CLK>;
0093 assigned-clock-rates = <50000000>, <25000000>, <40000000>;
0094 };
0095
0096 &pic32_pinctrl {
0097
0098 pinctrl_sdhc1: sdhc1_pins0 {
0099 pins = "A6", "D4", "G13", "G12", "G14", "A7", "A0";
0100 microchip,digital;
0101 };
0102
0103 user_leds_s0: user_leds_s0 {
0104 pins = "H0", "H1", "H2";
0105 output-low;
0106 microchip,digital;
0107 };
0108
0109 user_buttons_s0: user_buttons_s0 {
0110 pins = "B12", "B13", "B14";
0111 microchip,digital;
0112 input-enable;
0113 bias-pull-up;
0114 };
0115
0116 pinctrl_uart2: pinctrl_uart2 {
0117 uart2-tx {
0118 pins = "G9";
0119 function = "U2TX";
0120 microchip,digital;
0121 output-high;
0122 };
0123 uart2-rx {
0124 pins = "B0";
0125 function = "U2RX";
0126 microchip,digital;
0127 input-enable;
0128 };
0129 };
0130
0131 pinctrl_uart4: uart4-0 {
0132 uart4-tx {
0133 pins = "C3";
0134 function = "U4TX";
0135 microchip,digital;
0136 output-high;
0137 };
0138 uart4-rx {
0139 pins = "E8";
0140 function = "U4RX";
0141 microchip,digital;
0142 input-enable;
0143 };
0144 };
0145 };