Trusted execution environment (TEE) technology has many uses, such as protecting data in the cloud and improving security for industrial IoT. However, there are technical challenges that limit its widespread adoption. These challenges include the fact that different TEE vendors have incompatible solutions, and devices equipped with the same TEE technology may belong to different owners, making it difficult to establish trust between them. To address these challenges and fully utilize TEE technology, a decentralized coordination mechanism called DHTee is proposed. DHTee uses blockchain technology to support key TEE functions in a heterogeneous TEE environment, especially attestation service. Devices equipped with TEE can interact securely with the blockchain to determine whether potential collaborating devices meet the requirements. DHTee is also flexible and can support new TEE schemes without affecting existing TEEs.