18c2ecf20Sopenharmony_ciGPIO-based multiplexer controller bindings 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciDefine what GPIO pins are used to control a multiplexer. Or several 48c2ecf20Sopenharmony_cimultiplexers, if the same pins control more than one multiplexer. 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ciRequired properties: 78c2ecf20Sopenharmony_ci- compatible : "gpio-mux" 88c2ecf20Sopenharmony_ci- mux-gpios : list of gpios used to control the multiplexer, least 98c2ecf20Sopenharmony_ci significant bit first. 108c2ecf20Sopenharmony_ci- #mux-control-cells : <0> 118c2ecf20Sopenharmony_ci* Standard mux-controller bindings as decribed in mux-controller.txt 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ciOptional properties: 148c2ecf20Sopenharmony_ci- idle-state : if present, the state the mux will have when idle. The 158c2ecf20Sopenharmony_ci special state MUX_IDLE_AS_IS is the default. 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ciThe multiplexer state is defined as the number represented by the 188c2ecf20Sopenharmony_cimultiplexer GPIO pins, where the first pin is the least significant 198c2ecf20Sopenharmony_cibit. An active pin is a binary 1, an inactive pin is a binary 0. 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ciExample: 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci mux: mux-controller { 248c2ecf20Sopenharmony_ci compatible = "gpio-mux"; 258c2ecf20Sopenharmony_ci #mux-control-cells = <0>; 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci mux-gpios = <&pioA 0 GPIO_ACTIVE_HIGH>, 288c2ecf20Sopenharmony_ci <&pioA 1 GPIO_ACTIVE_HIGH>; 298c2ecf20Sopenharmony_ci }; 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci adc-mux { 328c2ecf20Sopenharmony_ci compatible = "io-channel-mux"; 338c2ecf20Sopenharmony_ci io-channels = <&adc 0>; 348c2ecf20Sopenharmony_ci io-channel-names = "parent"; 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci mux-controls = <&mux>; 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci channels = "sync-1", "in", "out", "sync-2"; 398c2ecf20Sopenharmony_ci }; 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci i2c-mux { 428c2ecf20Sopenharmony_ci compatible = "i2c-mux"; 438c2ecf20Sopenharmony_ci i2c-parent = <&i2c1>; 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci mux-controls = <&mux>; 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci #address-cells = <1>; 488c2ecf20Sopenharmony_ci #size-cells = <0>; 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ci i2c@0 { 518c2ecf20Sopenharmony_ci reg = <0>; 528c2ecf20Sopenharmony_ci #address-cells = <1>; 538c2ecf20Sopenharmony_ci #size-cells = <0>; 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ci ssd1307: oled@3c { 568c2ecf20Sopenharmony_ci /* ... */ 578c2ecf20Sopenharmony_ci }; 588c2ecf20Sopenharmony_ci }; 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ci i2c@3 { 618c2ecf20Sopenharmony_ci reg = <3>; 628c2ecf20Sopenharmony_ci #address-cells = <1>; 638c2ecf20Sopenharmony_ci #size-cells = <0>; 648c2ecf20Sopenharmony_ci 658c2ecf20Sopenharmony_ci pca9555: pca9555@20 { 668c2ecf20Sopenharmony_ci /* ... */ 678c2ecf20Sopenharmony_ci }; 688c2ecf20Sopenharmony_ci }; 698c2ecf20Sopenharmony_ci }; 70