1 1.1 riastrad /* $NetBSD: intel_gmbus.h,v 1.2 2021/12/18 23:45:30 riastradh Exp $ */ 2 1.1 riastrad 3 1.1 riastrad /* SPDX-License-Identifier: MIT */ 4 1.1 riastrad /* 5 1.1 riastrad * Copyright 2019 Intel Corporation 6 1.1 riastrad */ 7 1.1 riastrad 8 1.1 riastrad #ifndef __INTEL_GMBUS_H__ 9 1.1 riastrad #define __INTEL_GMBUS_H__ 10 1.1 riastrad 11 1.1 riastrad #include <linux/types.h> 12 1.1 riastrad 13 1.1 riastrad struct drm_i915_private; 14 1.1 riastrad struct i2c_adapter; 15 1.1 riastrad 16 1.1 riastrad #define GMBUS_PIN_DISABLED 0 17 1.1 riastrad #define GMBUS_PIN_SSC 1 18 1.1 riastrad #define GMBUS_PIN_VGADDC 2 19 1.1 riastrad #define GMBUS_PIN_PANEL 3 20 1.1 riastrad #define GMBUS_PIN_DPD_CHV 3 /* HDMID_CHV */ 21 1.1 riastrad #define GMBUS_PIN_DPC 4 /* HDMIC */ 22 1.1 riastrad #define GMBUS_PIN_DPB 5 /* SDVO, HDMIB */ 23 1.1 riastrad #define GMBUS_PIN_DPD 6 /* HDMID */ 24 1.1 riastrad #define GMBUS_PIN_RESERVED 7 /* 7 reserved */ 25 1.1 riastrad #define GMBUS_PIN_1_BXT 1 /* BXT+ (atom) and CNP+ (big core) */ 26 1.1 riastrad #define GMBUS_PIN_2_BXT 2 27 1.1 riastrad #define GMBUS_PIN_3_BXT 3 28 1.1 riastrad #define GMBUS_PIN_4_CNP 4 29 1.1 riastrad #define GMBUS_PIN_9_TC1_ICP 9 30 1.1 riastrad #define GMBUS_PIN_10_TC2_ICP 10 31 1.1 riastrad #define GMBUS_PIN_11_TC3_ICP 11 32 1.1 riastrad #define GMBUS_PIN_12_TC4_ICP 12 33 1.1 riastrad #define GMBUS_PIN_13_TC5_TGP 13 34 1.1 riastrad #define GMBUS_PIN_14_TC6_TGP 14 35 1.1 riastrad 36 1.1 riastrad #define GMBUS_NUM_PINS 15 /* including 0 */ 37 1.1 riastrad 38 1.1 riastrad int intel_gmbus_setup(struct drm_i915_private *dev_priv); 39 1.1 riastrad void intel_gmbus_teardown(struct drm_i915_private *dev_priv); 40 1.1 riastrad bool intel_gmbus_is_valid_pin(struct drm_i915_private *dev_priv, 41 1.1 riastrad unsigned int pin); 42 1.1 riastrad int intel_gmbus_output_aksv(struct i2c_adapter *adapter); 43 1.1 riastrad 44 1.1 riastrad struct i2c_adapter * 45 1.1 riastrad intel_gmbus_get_adapter(struct drm_i915_private *dev_priv, unsigned int pin); 46 1.1 riastrad void intel_gmbus_set_speed(struct i2c_adapter *adapter, int speed); 47 1.1 riastrad void intel_gmbus_force_bit(struct i2c_adapter *adapter, bool force_bit); 48 1.1 riastrad bool intel_gmbus_is_forced_bit(struct i2c_adapter *adapter); 49 1.1 riastrad void intel_gmbus_reset(struct drm_i915_private *dev_priv); 50 1.1 riastrad 51 1.1 riastrad #endif /* __INTEL_GMBUS_H__ */ 52