1// SPDX-License-Identifier: BSD-3-Clause 2/* 3 * Copyright (c) 2021, Linaro Limited 4 */ 5 6#include <dt-bindings/input/input.h> 7#include <dt-bindings/input/linux-event-codes.h> 8#include <dt-bindings/interrupt-controller/irq.h> 9#include <dt-bindings/spmi/spmi.h> 10 11/* (Sadly) this PMIC can be configured to be at different SIDs */ 12#ifndef PMK8350_SID 13 #define PMK8350_SID 0 14#endif 15 16&spmi_bus { 17 pmk8350: pmic@PMK8350_SID { 18 compatible = "qcom,pmk8350", "qcom,spmi-pmic"; 19 reg = <PMK8350_SID SPMI_USID>; 20 #address-cells = <1>; 21 #size-cells = <0>; 22 23 pmk8350_pon: pon@1300 { 24 compatible = "qcom,pmk8350-pon"; 25 reg = <0x1300>, <0x800>; 26 reg-names = "hlos", "pbs"; 27 28 pon_pwrkey: pwrkey { 29 compatible = "qcom,pmk8350-pwrkey"; 30 interrupts = <PMK8350_SID 0x13 0x7 IRQ_TYPE_EDGE_BOTH>; 31 linux,code = <KEY_POWER>; 32 status = "disabled"; 33 }; 34 35 pon_resin: resin { 36 compatible = "qcom,pmk8350-resin"; 37 interrupts = <PMK8350_SID 0x13 0x6 IRQ_TYPE_EDGE_BOTH>; 38 status = "disabled"; 39 }; 40 }; 41 42 pmk8350_vadc: adc@3100 { 43 compatible = "qcom,spmi-adc7"; 44 reg = <0x3100>; 45 #address-cells = <1>; 46 #size-cells = <0>; 47 interrupts = <PMK8350_SID 0x31 0x0 IRQ_TYPE_EDGE_RISING>; 48 #io-channel-cells = <1>; 49 }; 50 51 pmk8350_adc_tm: adc-tm@3400 { 52 compatible = "qcom,adc-tm7"; 53 reg = <0x3400>; 54 interrupts = <PMK8350_SID 0x34 0x0 IRQ_TYPE_EDGE_RISING>; 55 #address-cells = <1>; 56 #size-cells = <0>; 57 #thermal-sensor-cells = <1>; 58 status = "disabled"; 59 }; 60 61 pmk8350_rtc: rtc@6100 { 62 compatible = "qcom,pmk8350-rtc"; 63 reg = <0x6100>, <0x6200>; 64 reg-names = "rtc", "alarm"; 65 interrupts = <PMK8350_SID 0x62 0x1 IRQ_TYPE_EDGE_RISING>; 66 status = "disabled"; 67 }; 68 69 pmk8350_gpios: gpio@b000 { 70 compatible = "qcom,pmk8350-gpio", "qcom,spmi-gpio"; 71 reg = <0xb000>; 72 gpio-controller; 73 gpio-ranges = <&pmk8350_gpios 0 0 4>; 74 #gpio-cells = <2>; 75 interrupt-controller; 76 #interrupt-cells = <2>; 77 }; 78 }; 79}; 80