Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0+
0002 /*
0003  * at91-natte.dts - Device Tree include file for the Natte board
0004  *
0005  * Copyright (C) 2017 Axentia Technologies AB
0006  *
0007  * Author: Peter Rosin <peda@axentia.se>
0008  */
0009 
0010 / {
0011         mux: mux-controller {
0012                 compatible = "gpio-mux";
0013                 #mux-control-cells = <0>;
0014 
0015                 mux-gpios = <&ioexp 0 GPIO_ACTIVE_HIGH>,
0016                             <&ioexp 1 GPIO_ACTIVE_HIGH>,
0017                             <&ioexp 2 GPIO_ACTIVE_HIGH>;
0018         };
0019 
0020         batntc-mux {
0021                 compatible = "io-channel-mux";
0022                 io-channels = <&adc 5>;
0023                 io-channel-names = "parent";
0024                 mux-controls = <&mux>;
0025 
0026                 channels =
0027                         "batntc0", "batntc1", "batntc2", "batntc3",
0028                         "batntc4", "batntc5", "batntc6", "batntc7";
0029         };
0030 
0031         batv-mux {
0032                 compatible = "io-channel-mux";
0033                 io-channels = <&adc 6>;
0034                 io-channel-names = "parent";
0035                 mux-controls = <&mux>;
0036 
0037                 channels =
0038                         "batv0", "batv1", "batv2", "batv3",
0039                         "batv4", "batv5", "batv6", "batv7";
0040         };
0041 
0042         iout-mux {
0043                 compatible = "io-channel-mux";
0044                 io-channels = <&adc 7>;
0045                 io-channel-names = "parent";
0046                 mux-controls = <&mux>;
0047 
0048                 channels =
0049                         "iout0", "iout1", "iout2", "iout3",
0050                         "iout4", "iout5", "iout6", "iout7";
0051         };
0052 
0053         i2c-mux {
0054                 compatible = "i2c-mux";
0055                 mux-locked;
0056                 i2c-parent = <&i2c0>;
0057                 mux-controls = <&mux>;
0058 
0059                 #address-cells = <1>;
0060                 #size-cells = <0>;
0061 
0062                 i2c@0 {
0063                         reg = <0>;
0064                         #address-cells = <1>;
0065                         #size-cells = <0>;
0066 
0067                         charger@9 {
0068                                 compatible = "ti,bq24735";
0069                                 reg = <0x9>;
0070 
0071                                 ti,charge-current = <2000>;
0072                                 ti,charge-voltage = <16800>;
0073 
0074                                 poll-interval = <20000>;
0075                         };
0076                 };
0077 
0078                 i2c@1 {
0079                         reg = <1>;
0080                         #address-cells = <1>;
0081                         #size-cells = <0>;
0082 
0083                         charger@9 {
0084                                 compatible = "ti,bq24735";
0085                                 reg = <0x9>;
0086 
0087                                 ti,charge-current = <2000>;
0088                                 ti,charge-voltage = <16800>;
0089 
0090                                 poll-interval = <20000>;
0091                         };
0092                 };
0093 
0094                 i2c@2 {
0095                         reg = <2>;
0096                         #address-cells = <1>;
0097                         #size-cells = <0>;
0098 
0099                         charger@9 {
0100                                 compatible = "ti,bq24735";
0101                                 reg = <0x9>;
0102 
0103                                 ti,charge-current = <2000>;
0104                                 ti,charge-voltage = <16800>;
0105 
0106                                 poll-interval = <20000>;
0107                         };
0108                 };
0109 
0110                 i2c@3 {
0111                         reg = <3>;
0112                         #address-cells = <1>;
0113                         #size-cells = <0>;
0114 
0115                         charger@9 {
0116                                 compatible = "ti,bq24735";
0117                                 reg = <0x9>;
0118 
0119                                 ti,charge-current = <2000>;
0120                                 ti,charge-voltage = <16800>;
0121 
0122                                 poll-interval = <20000>;
0123                         };
0124                 };
0125 
0126                 i2c@4 {
0127                         reg = <4>;
0128                         #address-cells = <1>;
0129                         #size-cells = <0>;
0130 
0131                         charger@9 {
0132                                 compatible = "ti,bq24735";
0133                                 reg = <0x9>;
0134 
0135                                 ti,charge-current = <2000>;
0136                                 ti,charge-voltage = <16800>;
0137 
0138                                 poll-interval = <20000>;
0139                         };
0140                 };
0141 
0142                 i2c@5 {
0143                         reg = <5>;
0144                         #address-cells = <1>;
0145                         #size-cells = <0>;
0146 
0147                         charger@9 {
0148                                 compatible = "ti,bq24735";
0149                                 reg = <0x9>;
0150 
0151                                 ti,charge-current = <2000>;
0152                                 ti,charge-voltage = <16800>;
0153 
0154                                 poll-interval = <20000>;
0155                         };
0156                 };
0157 
0158                 i2c@6 {
0159                         reg = <6>;
0160                         #address-cells = <1>;
0161                         #size-cells = <0>;
0162 
0163                         charger@9 {
0164                                 compatible = "ti,bq24735";
0165                                 reg = <0x9>;
0166 
0167                                 ti,charge-current = <2000>;
0168                                 ti,charge-voltage = <16800>;
0169 
0170                                 poll-interval = <20000>;
0171                         };
0172                 };
0173 
0174                 i2c@7 {
0175                         reg = <7>;
0176                         #address-cells = <1>;
0177                         #size-cells = <0>;
0178 
0179                         charger@9 {
0180                                 compatible = "ti,bq24735";
0181                                 reg = <0x9>;
0182 
0183                                 ti,charge-current = <2000>;
0184                                 ti,charge-voltage = <16800>;
0185 
0186                                 poll-interval = <20000>;
0187                         };
0188                 };
0189         };
0190 };
0191 
0192 &i2c0 {
0193         status = "okay";
0194 
0195         ioexp: ioexp@20 {
0196                 #gpio-cells = <2>;
0197                 compatible = "semtech,sx1502q";
0198                 reg = <0x20>;
0199 
0200                 gpio-controller;
0201                 ngpios = <8>;
0202 
0203                 pinctrl-names = "default";
0204                 pinctrl-0 = <&gpio3_cfg_pins>;
0205 
0206                 gpio3_cfg_pins: gpio3_cfg {
0207                         pins = "gpio3";
0208                         bias-pull-up;
0209                 };
0210         };
0211 
0212         adc: adc@48 {
0213                 compatible = "ti,ads1015";
0214                 reg = <0x48>;
0215                 #io-channel-cells = <1>;
0216 
0217                 #address-cells = <1>;
0218                 #size-cells = <0>;
0219 
0220                 channel@4 {
0221                         reg = <4>;
0222                         ti,gain = <2>;
0223                         ti,datarate = <4>;
0224                 };
0225 
0226                 channel@5 {
0227                         reg = <5>;
0228                         ti,gain = <2>;
0229                         ti,datarate = <4>;
0230                 };
0231 
0232                 channel@6 {
0233                         reg = <6>;
0234                         ti,gain = <1>;
0235                         ti,datarate = <4>;
0236                 };
0237 
0238                 channel@7 {
0239                         reg = <7>;
0240                         ti,gain = <3>;
0241                         ti,datarate = <4>;
0242                 };
0243         };
0244 };