1# Copyright (c) 2021 Nuvoton Technology Corporation. 2# SPDX-License-Identifier: Apache-2.0 3 4description: | 5 Nuvoton NCT38XX series I2C-based GPIO expander 6 7 This must be a child of the NCT38xx multi-function device. 8 9 Example: 10 &i2c0_0 { 11 nct3807@70 { 12 compatible = "nuvoton,nct38xx"; 13 reg = <0x70>; 14 15 nct3807-gpio { 16 #address-cells = <1>; 17 #size-cells = <0>; 18 compatible = "nuvoton,nct38xx-gpio"; 19 20 gpio@0 { 21 compatible = "nuvoton,nct38xx-gpio-port"; 22 reg = <0x0>; 23 gpio-controller; 24 #gpio-cells = <2>; 25 ngpios = <8>; 26 pin_mask = <0xff>; 27 pinmux_mask = <0xf7>; 28 }; 29 30 gpio@1 { 31 compatible = "nuvoton,nct38xx-gpio-port"; 32 reg = <0x1>; 33 gpio-controller; 34 #gpio-cells = <2>; 35 ngpios = <8>; 36 pin_mask = <0xff>; 37 }; 38 }; 39 }; 40 41 nct3808_0_P1@71 { 42 compatible = "nuvoton,nct38xx"; 43 reg = <0x71>; 44 45 nct3808-0-p1-gpio { 46 #address-cells = <1>; 47 #size-cells = <0>; 48 compatible = "nuvoton,nct38xx-gpio"; 49 50 gpio@0 { 51 compatible = "nuvoton,nct38xx-gpio-port"; 52 reg = <0x0>; 53 gpio-controller; 54 #gpio-cells = <2>; 55 ngpios = <8>; 56 pin_mask = <0xdc>; 57 pinmux_mask = <0xff>; 58 }; 59 }; 60 }; 61 62 nct3808_0_P2@75 { 63 compatible = "nuvoton,nct38xx"; 64 reg = <0x75>; 65 66 nct3808-0-P2-gpio { 67 #address-cells = <1>; 68 #size-cells = <0>; 69 compatible = "nuvoton,nct38xx-gpio"; 70 71 gpio@0 { 72 compatible = "nuvoton,nct38xx-gpio-port"; 73 reg = <0x0>; 74 gpio-controller; 75 #gpio-cells = <2>; 76 ngpios = <8>; 77 pin_mask = <0xdc>; 78 pinmux_mask = <0xff>; 79 }; 80 }; 81 }; 82 }; 83 84compatible: "nuvoton,nct38xx-gpio" 85 86include: [base.yaml] 87